Class: Gluez::Vars
- Inherits:
-
Object
- Object
- Gluez::Vars
- Defined in:
- lib/gluez/erb/vars.rb
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(hash = {}) ⇒ Vars
constructor
A new instance of Vars.
- #metaclass ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ Vars
Returns a new instance of Vars.
3 4 5 6 7 8 9 |
# File 'lib/gluez/erb/vars.rb', line 3 def initialize(hash={}) hash.each_pair do |key, val| self..send(:define_method, key) do val end end end |
Instance Method Details
#get_binding ⇒ Object
15 16 17 |
# File 'lib/gluez/erb/vars.rb', line 15 def get_binding binding end |
#metaclass ⇒ Object
11 12 13 |
# File 'lib/gluez/erb/vars.rb', line 11 def class << self; self; end end |