Sha256: cf75db557161226f6a7339b986530974da5b9b655e2a1f479ece1fb023aa108a
Contents?: true
Size: 700 Bytes
Versions: 15
Compression:
Stored size: 700 Bytes
Contents
require 'spiderfw/templates/template_blocks' module Spider; module TemplateBlocks # *sp:parent-context* # Executes the content using the parent's scene class ParentContext < Block def compile(options={}) init = "" c = "" # c += "debugger\n" parent_c, parent_init = compile_content(c, init, options) parent_c.gsub!("'", "\\\\'") parent_init.gsub!("'", "\\\\'") c += "self[:_parent].instance_eval('def __run_block\n;#{parent_c}\nend\n')\n" c += "yield :_parent\n" return CompiledBlock.new(init, c) end end end; end
Version data entries
15 entries across 15 versions & 1 rubygems