-
Hash#fetch
to avoid typohash[:sometihng] => nil hash.fetch(:sometihng) => KeyError
-
Use Constant to avoid typo.
NameError
when typo -
attr_*
raisesNoMethodError
when typo -
Use
Hash[hash]
to create hash
Hash#fetch
to avoid typo
hash[:sometihng] => nil
hash.fetch(:sometihng) => KeyError
Use Constant to avoid typo. NameError
when typo
attr_*
raises NoMethodError
when typo
Use Hash[hash]
to create hash