Module: IndifferentVariableHash

Defined in:
lib/indifferent-variable-hash.rb

Defined Under Namespace

Classes: Hash

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/indifferent-variable-hash.rb', line 10

def method_missing name, *args
  begin
    self.variables.send name, *args
  rescue Exception => ex
    super
  end 
end

Instance Attribute Details

#variablesObject

Returns the value of attribute variables.



4
5
6
# File 'lib/indifferent-variable-hash.rb', line 4

def variables
  @variables
end