Class: Liquid2::DocTag
Overview
The standard doc tag.
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token, text) ⇒ DocTag
constructor
A new instance of DocTag.
- #render(_context, _buffer) ⇒ Object
Methods inherited from Tag
Methods inherited from Node
#block_scope, #children, #expressions, #partial_scope, #render_with_disabled_tag_check, #template_scope
Constructor Details
#initialize(token, text) ⇒ DocTag
Returns a new instance of DocTag.
19 20 21 22 |
# File 'lib/liquid2/nodes/tags/doc.rb', line 19 def initialize(token, text) super(token) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
8 9 10 |
# File 'lib/liquid2/nodes/tags/doc.rb', line 8 def text @text end |
Class Method Details
.parse(token, parser) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/liquid2/nodes/tags/doc.rb', line 10 def self.parse(token, parser) parser.carry_whitespace_control parser.eat(:token_tag_end) text_token = parser.eat(:token_doc) parser.eat_empty_tag("enddoc") new(token, text_token[1] || raise) end |
Instance Method Details
#render(_context, _buffer) ⇒ Object
24 |
# File 'lib/liquid2/nodes/tags/doc.rb', line 24 def render(_context, _buffer) = 0 |