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



61
62
63
64
65
66
67
68
# File 'lib/jazor.rb', line 61

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