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