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



71
72
73
74
75
76
77
78
# File 'lib/jazor.rb', line 71

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