Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.