Sha256: ac1e971350fe23ff09a4beec9d4a84c93338ec917d752f1ecd72a02acb63f9ef
Contents?: true
Size: 537 Bytes
Versions: 12
Compression:
Stored size: 537 Bytes
Contents
class ReactiveTemplate include Events def initialize(page, context, template_path) @template_path = template_path @target = AttributeTarget.new(nil, nil, self) @template = TemplateRenderer.new(page, @target, context, "main", template_path) end def reactive? true end # Render the template and get the current value def cur @target.to_html end def update trigger!('changed') end def remove @template.remove @template = nil @target = nil @template_path = nil end end
Version data entries
12 entries across 12 versions & 1 rubygems