Class: Braavos::Template::Namespace

Inherits:
Object
  • Object
show all
Defined in:
lib/braavos/template.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Namespace

Returns a new instance of Namespace.



26
27
28
29
30
# File 'lib/braavos/template.rb', line 26

def initialize(hash)
  hash.each do |key, value|
    singleton_class.send(:define_method, key) { value }
  end
end

Instance Method Details

#get_bindingObject



32
33
34
# File 'lib/braavos/template.rb', line 32

def get_binding
  binding
end