Class: Dodebui::TemplateNamespace
- Inherits:
-
Object
- Object
- Dodebui::TemplateNamespace
- Defined in:
- lib/dodebui/template_namespace.rb
Overview
namespace for evaluationg templates
Instance Method Summary collapse
-
#initialize(hash) ⇒ TemplateNamespace
constructor
A new instance of TemplateNamespace.
- #priv_binding ⇒ Object
Constructor Details
#initialize(hash) ⇒ TemplateNamespace
Returns a new instance of TemplateNamespace.
4 5 6 7 8 |
# File 'lib/dodebui/template_namespace.rb', line 4 def initialize(hash) hash.each do |key, value| singleton_class.send(:define_method, key) { value } end end |
Instance Method Details
#priv_binding ⇒ Object
10 11 12 |
# File 'lib/dodebui/template_namespace.rb', line 10 def priv_binding binding end |