Class: Dodebui::TemplateNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/dodebui/template_namespace.rb

Overview

namespace for evaluationg templates

Instance Method Summary collapse

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_bindingObject



10
11
12
# File 'lib/dodebui/template_namespace.rb', line 10

def priv_binding
  binding
end