DEV Community

Discussion on: Truth tables as Ruby Hashes

Collapse
 
tadman profile image
Scott Tadman

While that's better it still creates clutter in your object. A default inspect will show @h = ... even though that's not really relevant to that object. There's no reason to create this per-object, either, it doesn't change. That's why I recommend as a constant, out of the way and implicitly shared.

Also remember that months have commonly recognized numerical identifiers, there's no need to say "feb" when 2 will do.