Parent

Liquid::Tag

Attributes

nodelist[RW]
options[RW]
warnings[R]

Public Class Methods

new(tag_name, markup, tokens) click to toggle source
# File lib/liquid/tag.rb, line 15
def initialize(tag_name, markup, tokens)
  @tag_name   = tag_name
  @markup     = markup
  @options    ||= {} # needs || because might be set before initialize
  parse(tokens)
end
new_with_options(tag_name, markup, tokens, options) click to toggle source
# File lib/liquid/tag.rb, line 6
def self.new_with_options(tag_name, markup, tokens, options)
  # Forgive me Matz for I have sinned. I know this code is weird
  # but it was necessary to maintain API compatibility.
  new_tag = self.allocate
  new_tag.options = options
  new_tag.send(:initialize, tag_name, markup, tokens)
  new_tag
end

Public Instance Methods

blank?() click to toggle source
# File lib/liquid/tag.rb, line 33
def blank?
  @blank || true
end
name() click to toggle source
# File lib/liquid/tag.rb, line 25
def name
  self.class.name.downcase
end
parse(tokens) click to toggle source
# File lib/liquid/tag.rb, line 22
def parse(tokens)
end
parse_with_selected_parser(markup) click to toggle source
# File lib/liquid/tag.rb, line 37
def parse_with_selected_parser(markup)
  case @options[:error_mode] || Template.error_mode
  when :strict then strict_parse_with_error_context(markup)
  when :lax    then lax_parse(markup)
  when :warn
    begin
      return strict_parse_with_error_context(markup)
    rescue SyntaxError => e
      @warnings ||= []
      @warnings << e
      return lax_parse(markup)
    end
  end
end
render(context) click to toggle source
# File lib/liquid/tag.rb, line 29
def render(context)
  ''
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.