Class: Liquid::Raw
Constant Summary collapse
Instance Attribute Summary
Attributes inherited from Tag
#line_number, #options, #warnings
Instance Method Summary collapse
Methods inherited from Block
#block_delimiter, #block_name, #initialize, #unknown_tag, #warnings
Methods inherited from Tag
#initialize, #name, parse, #raw
Methods included from ParserSwitching
Constructor Details
This class inherits a constructor from Liquid::Block
Instance Method Details
#blank? ⇒ Boolean
24 25 26 |
# File 'lib/liquid/tags/raw.rb', line 24 def blank? @body.empty? end |
#nodelist ⇒ Object
20 21 22 |
# File 'lib/liquid/tags/raw.rb', line 20 def nodelist [@body] end |
#parse(tokens) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/liquid/tags/raw.rb', line 5 def parse(tokens) @body = '' while token = tokens.shift if token =~ FullTokenPossiblyInvalid @body << $1 if $1 != "".freeze return if block_delimiter == $2 end @body << token if not token.empty? end end |
#render(context) ⇒ Object
16 17 18 |
# File 'lib/liquid/tags/raw.rb', line 16 def render(context) @body end |