Class: JSONRecord::JSONHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/JSONRecord/json_hash.rb

Direct Known Subclasses

Base

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



3
4
5
6
7
# File 'lib/JSONRecord/json_hash.rb', line 3

def method_missing(name, *args , &block)
  if self.keys.include?(name.to_s) 
    self[name.to_s]
  end
end