Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Ruby Modules Include and Extend Being Included

gene c
gene c
13,630 Points

Why the fetch count needs to have '@' in front when we already defined it in attr_accessor :fetch_count?

i thought we do not have to add the '@' once it has been included in the attr_accessor

1 Answer

Matt Campbell
Matt Campbell
1,012 Points

Actually, I believe you are correct. I ran this without it and it worked fine. I believe it's more of a performance thing here than anything. It would take up less memory to not use the @ than to use the @. Probably was just being granular and trying to get the other concepts across.