Class: Knot::Render::Binding

Inherits:
Object
  • Object
show all
Defined in:
lib/knot/render/binding.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Binding

Returns a new instance of Binding.



4
5
6
7
8
9
# File 'lib/knot/render/binding.rb', line 4

def initialize(options)
  options.each do |key, value|
    instance_variable_set("@#{key.to_s}", value)
    self.class.instance_eval { attr_reader key }
  end
end

Instance Method Details

#get_bindingObject



11
12
13
# File 'lib/knot/render/binding.rb', line 11

def get_binding
  binding
end