Sha256: ed6735449cf9ae1a78ec3e0f1d70a43628bf243f290d60f4036f1a12b842ef2a
Contents?: true
Size: 589 Bytes
Versions: 24
Compression:
Stored size: 589 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.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 def remove @sub_bindings.each(&:remove) @sub_bindings = [] super end end
Version data entries
24 entries across 24 versions & 1 rubygems