Class: Rtprov::Template::RenderingContext

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

Instance Method Summary collapse

Constructor Details

#initialize(local_vars) ⇒ RenderingContext

Returns a new instance of RenderingContext.



6
7
8
9
10
11
# File 'lib/rtprov/template.rb', line 6

def initialize(local_vars)
  local_vars.transform_values! {|v| hash_with_accessor(v) }
  local_vars.each do |k, v|
    binding.local_variable_set(k.to_sym, v)
  end
end

Instance Method Details

#bindingObject



13
14
15
# File 'lib/rtprov/template.rb', line 13

def binding
  @binding ||= super
end