Ruby Ruby Modules Include and Extend Being Included

gene c
gene c
13,629 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.