Class: TemplateRenderer
- Inherits:
- 
      BaseBinding
      
        - Object
- BaseBinding
- TemplateRenderer
 
- Defined in:
- lib/volt/page/template_renderer.rb
Instance Attribute Summary collapse
- 
  
    
      #context  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute context. 
Attributes inherited from BaseBinding
Instance Method Summary collapse
- 
  
    
      #initialize(page, target, context, binding_name, template_name)  ⇒ TemplateRenderer 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of TemplateRenderer. 
- #remove ⇒ Object
Methods inherited from BaseBinding
Constructor Details
#initialize(page, target, context, binding_name, template_name) ⇒ TemplateRenderer
| 5 6 7 8 9 10 11 12 13 14 15 16 17 | # File 'lib/volt/page/template_renderer.rb', line 5 def initialize(page, target, context, binding_name, template_name) super(page, target, context, binding_name) @sub_bindings = [] bindings = self.dom_section.set_content_to_template(page, template_name) bindings.each_pair do |id,bindings_for_id| bindings_for_id.each do |binding| @sub_bindings << binding.call(page, target, context, id) end end end | 
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
| 4 5 6 | # File 'lib/volt/page/template_renderer.rb', line 4 def context @context end | 
Instance Method Details
#remove ⇒ Object
| 19 20 21 22 23 24 | # File 'lib/volt/page/template_renderer.rb', line 19 def remove @sub_bindings.each(&:remove) @sub_bindings = [] super end |