Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/lily/hash.rb
Overview
I love dot notation more than life itself
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *opts) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/lily/hash.rb', line 3 def method_missing(method, *opts) m = method.to_s if self.has_key?(m) return self[m] elsif self.has_key?(m.to_sym) return self[m.to_sym] end super end |