class Liquid::Raw
Constants
- FullTokenPossiblyInvalid
- Syntax
Public Class Methods
new(tag_name, markup, parse_context)
click to toggle source
Calls superclass method
Liquid::Block::new
# File lib/liquid/tags/raw.rb, line 8 def initialize(tag_name, markup, parse_context) super ensure_valid_markup(tag_name, markup, parse_context) end
Public Instance Methods
blank?()
click to toggle source
# File lib/liquid/tags/raw.rb, line 36 def blank? @body.empty? end
nodelist()
click to toggle source
# File lib/liquid/tags/raw.rb, line 32 def nodelist [@body] end
parse(tokens)
click to toggle source
# File lib/liquid/tags/raw.rb, line 14 def parse(tokens) @body = +'' while (token = tokens.shift) if token =~ FullTokenPossiblyInvalid && block_delimiter == Regexp.last_match(2) @body << Regexp.last_match(1) if Regexp.last_match(1) != "" return end @body << token unless token.empty? end raise_tag_never_closed(block_name) end
render_to_output_buffer(_context, output)
click to toggle source
# File lib/liquid/tags/raw.rb, line 27 def render_to_output_buffer(_context, output) output << @body output end
Protected Instance Methods
ensure_valid_markup(tag_name, markup, parse_context)
click to toggle source
# File lib/liquid/tags/raw.rb, line 42 def ensure_valid_markup(tag_name, markup, parse_context) unless Syntax.match?(markup) raise SyntaxError, parse_context.locale.t("errors.syntax.tag_unexpected_args", tag: tag_name) end end