Module: Footing::NilClass
- Defined in:
- lib/footing/extensions/nil_class.rb
Instance Method Summary collapse
-
#[](key) ⇒ Object
Calling [] on nil returns nil instead of raising an exception.
Instance Method Details
#[](key) ⇒ Object
Calling [] on nil returns nil instead of raising an exception. Helpful when looping over nested Hashes.
12 13 14 |
# File 'lib/footing/extensions/nil_class.rb', line 12 def [](key) nil end |