Class: Rbexy::HashMash
- Inherits:
-
Hash
- Object
- Hash
- Rbexy::HashMash
- Defined in:
- lib/rbexy/hash_mash.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ HashMash
constructor
A new instance of HashMash.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(hash) ⇒ HashMash
Returns a new instance of HashMash.
3 4 5 |
# File 'lib/rbexy/hash_mash.rb', line 3 def initialize(hash) replace(hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/rbexy/hash_mash.rb', line 7 def method_missing(meth, *args, &block) if has_key?(meth) self[meth] else super end end |