Sha256: 7dea46fb564b8bb5a3c845fa7eec8a7efb365c5f6ff719ce3c4709f20d58a42d
Contents?: true
Size: 585 Bytes
Versions: 2
Compression:
Stored size: 585 Bytes
Contents
require 'volt/page/bindings/base_binding' class TemplateRenderer < BaseBinding attr_reader :context def initialize(page, target, context, binding_name, template_name) super(page, target, context, binding_name) @sub_bindings = [] bindings = self.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 def remove @sub_bindings.each(&:remove) @sub_bindings = [] super end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
volt-0.7.13 | lib/volt/page/template_renderer.rb |
volt-0.7.12 | lib/volt/page/template_renderer.rb |