Class: Spider::TemplateBlocks::Yield

Inherits:
Block show all
Defined in:
lib/spiderfw/templates/blocks/yield.rb

Instance Attribute Summary

Attributes inherited from Block

#allowed_blocks, #doctype, #el, #template

Instance Method Summary collapse

Methods inherited from Block

#compile_content, #compile_text, #escape_text, #get_following, #initialize, #inspect, #parse_content, var_to_scene, #var_to_scene, #vars_to_scene, vars_to_scene

Constructor Details

This class inherits a constructor from Spider::TemplateBlocks::Block

Instance Method Details

#compile(options = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/spiderfw/templates/blocks/yield.rb', line 7

def compile(options={})
    init = nil
    to = @el.get_attribute('to') || 'yield_to'
    #c = "self[:yield_to][:controller].send(self[:yield_to][:action], *self[:yield_to][:arguments])\n"
    c = "yield :#{to}\n"
    return CompiledBlock.new(init, c)
end