Files
liquid/lib/liquid/tag.rb
2015-07-02 20:18:09 +00:00

43 lines
707 B
Ruby

module Liquid
class Tag
attr_accessor :options, :line_number
attr_reader :nodelist, :warnings, :tag_name
include ParserSwitching
class << self
def parse(tag_name, markup, tokens, options)
tag = new(tag_name, markup, options)
tag.parse(tokens)
tag
end
private :new
end
def initialize(tag_name, markup, options)
@tag_name = tag_name
@markup = markup
@options = options
end
def parse(_tokens)
end
def raw
"#{@tag_name} #{@markup}"
end
def name
self.class.name.downcase
end
def render(_context)
''.freeze
end
def blank?
false
end
end
end