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