Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/jazor.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, value = nil) ⇒ Object



64
65
66
67
68
69
70
71
# File 'lib/jazor.rb', line 64

def method_missing(name, value=nil)
  str_name = name.to_s
  if self.has_key?(str_name)
    self[str_name]
  else
    nil
  end
end