3 ms·
As an aside, it's bad practice to use @@ variables (IMO), they're easily clobbered. Class instance variables are much better[1]. I might also add, if you creat
by brigandish 4y ago
As an aside, it's bad practice to use @@ variables (IMO), they're easily clobbered. Class instance variables are much better[1].
I might also add, if you create getters for an instance variable then you don't need to use the @, except in the getter itself (and you don't even need to do that as there is the `attr_reader` helper for that).
[1] https://maximomussini.com/posts/ruby-class-variables https://maximomussini.com/posts/ruby-class-variables