Class: Twig::Node::Print
Instance Attribute Summary
Attributes inherited from Base
#attributes, #lineno, #nodes, #source_context, #tag
Instance Method Summary collapse
- #compile(compiler) ⇒ Object
- 
  
    
      #initialize(expr, lineno)  ⇒ Print 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Print. 
Methods inherited from Base
Constructor Details
#initialize(expr, lineno) ⇒ Print
Returns a new instance of Print.
| 6 7 8 | # File 'lib/twig/node/print.rb', line 6 def initialize(expr, lineno) super({ expr: }, {}, lineno) end | 
Instance Method Details
#compile(compiler) ⇒ Object
| 10 11 12 13 14 15 | # File 'lib/twig/node/print.rb', line 10 def compile(compiler) compiler. write('@output_buffer.append = '). subcompile(nodes[:expr]). raw(";\n") end |