Class: Luoma::RawTag
- Defined in:
- lib/luoma/tags/raw.rb,
sig/luoma/tags/raw.rbs
Instance Attribute Summary
Attributes inherited from Markup
Class Method Summary collapse
-
.parse(token, tag_name, parser) ⇒ Markup
(t_token, String, Parser) -> Markup.
Instance Method Summary collapse
-
#initialize(token, tag_name, text) ⇒ RawTag
constructor
(t_token, String, String) -> void.
- #render(context, buffer) ⇒ Object
Methods inherited from Markup
#block_scope, #children, #expressions, #partial, #template_scope
Constructor Details
#initialize(token, tag_name, text) ⇒ RawTag
(t_token, String, String) -> void
15 16 17 18 19 |
# File 'lib/luoma/tags/raw.rb', line 15 def initialize(token, tag_name, text) super(token) @tag_name = tag_name @text = text end |
Class Method Details
.parse(token, tag_name, parser) ⇒ Markup
(t_token, String, Parser) -> Markup
6 7 8 9 10 11 12 |
# File 'lib/luoma/tags/raw.rb', line 6 def self.parse(token, tag_name, parser) parser.carry_whitespace_control parser.eat(:token_tag_end) text_token = parser.eat(:token_text) parser.eat_empty_tag("endraw") new(token, tag_name, Luoma.get_token_value(text_token, parser.source)) end |
Instance Method Details
#render(context, buffer) ⇒ Object
22 23 24 |
# File 'lib/luoma/tags/raw.rb', line 22 def render(context, buffer) buffer << @text end |