Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-ipmitool.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



9
10
11
12
13
14
15
# File 'lib/ruby-ipmitool.rb', line 9

def method_missing(name, *args, &blk)
  if self.keys.map(&:to_sym).include? name.to_sym
    return self[name.to_sym]
  else
    super
  end
end