Class: Twig::Node::AutoEscape

Inherits:
Base
  • Object
show all
Defined in:
lib/twig/node/auto_escape.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #lineno, #nodes, #source_context, #tag

Instance Method Summary collapse

Methods inherited from Base

#empty?, #length, #template_name, #to_s

Constructor Details

#initialize(value, body, lineno) ⇒ AutoEscape

Returns a new instance of AutoEscape.

Parameters:

  • value (String, FalseClass)
  • body (Node::Base)
  • lineno (Integer)


9
10
11
# File 'lib/twig/node/auto_escape.rb', line 9

def initialize(value, body, lineno)
  super({ body: }, { value: }, lineno)
end

Instance Method Details

#compile(compiler) ⇒ Object



13
14
15
# File 'lib/twig/node/auto_escape.rb', line 13

def compile(compiler)
  compiler.subcompile(nodes[:body])
end