Class: Twig::Node::BlockReference
- Inherits:
-
Node::Base
- Object
- Node::Base
- Twig::Node::BlockReference
- Includes:
- Output
- Defined in:
- lib/twig/node/block_reference.rb
Instance Method Summary collapse
- #compile(compiler) ⇒ Object
-
#initialize(name, lineno) ⇒ BlockReference
constructor
A new instance of BlockReference.
Constructor Details
#initialize(name, lineno) ⇒ BlockReference
Returns a new instance of BlockReference.
8 9 10 |
# File 'lib/twig/node/block_reference.rb', line 8 def initialize(name, lineno) super({}, { name: }, lineno) end |
Instance Method Details
#compile(compiler) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/twig/node/block_reference.rb', line 12 def compile(compiler) compiler. add_debug_info(self). write('context.output_buffer.safe_append = '). raw("render_block(:#{attributes[:name]}, context, blocks)"). raw("\n") end |