Class: Liquid::Document
Constant Summary
Constants inherited from BlockBody
BlockBody::ContentOfVariable, BlockBody::FullToken, BlockBody::TAGSTART, BlockBody::VARSTART
Instance Attribute Summary
Attributes inherited from BlockBody
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BlockBody
#blank?, #initialize, #render, #render_token_with_profiling, #warnings
Constructor Details
This class inherits a constructor from Liquid::BlockBody
Class Method Details
.parse(tokens, options) ⇒ Object
3 4 5 6 7 |
# File 'lib/liquid/document.rb', line 3 def self.parse(tokens, ) doc = new doc.parse(tokens, ) doc end |
Instance Method Details
#parse(tokens, options) ⇒ Object
9 10 11 12 13 |
# File 'lib/liquid/document.rb', line 9 def parse(tokens, ) super do |end_tag_name, end_tag_params| unknown_tag(end_tag_name, ) if end_tag_name end end |
#unknown_tag(tag, options) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/liquid/document.rb', line 15 def unknown_tag(tag, ) case tag when 'else'.freeze, 'end'.freeze raise SyntaxError.new([:locale].t("errors.syntax.unexpected_outer_tag".freeze, :tag => tag)) else raise SyntaxError.new([:locale].t("errors.syntax.unknown_tag".freeze, :tag => tag)) end end |