Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/core_ext/hash.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/core_ext/hash.rb', line 3 def method_missing(method, *args, &block) if self.has_key? method return self[method] elsif self.has_key? method.to_s return self[method.to_s] else super end end |