Class: Lore::GUI::ERB_Binding_Params

Inherits:
Object
  • Object
show all
Defined in:
lib/lore/gui/erb_template.rb

Instance Method Summary collapse

Constructor Details

#initialize(param_hash) ⇒ ERB_Binding_Params

Returns a new instance of ERB_Binding_Params.



11
12
13
14
15
16
# File 'lib/lore/gui/erb_template.rb', line 11

def initialize(param_hash)
  @params = Hash.new
  param_hash.each_pair { |key,value|
    @params[key.to_s.intern] = value 
  }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



26
27
28
# File 'lib/lore/gui/erb_template.rb', line 26

def method_missing(method)
  @params[method]
end

Instance Method Details

#get(param) ⇒ Object



18
19
20
# File 'lib/lore/gui/erb_template.rb', line 18

def get(param)
  @params[param]
end

#param(param) ⇒ Object



22
23
24
# File 'lib/lore/gui/erb_template.rb', line 22

def param(param)
  @params[param]
end