Class: Braavos::Template::Namespace
- Inherits:
-
Object
- Object
- Braavos::Template::Namespace
- Defined in:
- lib/braavos/template.rb
Overview
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(hash) ⇒ Namespace
constructor
A new instance of Namespace.
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_binding ⇒ Object
32 33 34 |
# File 'lib/braavos/template.rb', line 32 def get_binding binding end |