Class: Hash

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

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



16
17
18
19
20
# File 'lib/github_api_v3/default.rb', line 16

def method_missing(name)
  return self[name] if key? name
  self.each { |k,v| return v if k.to_s.to_sym == name }
  super.method_missing name
end