Sha256: f592fa834ff99f678b293a5b27e5056dae3666c17790c1e8922dea7591ee88f9

Contents?: true

Size: 795 Bytes

Versions: 11

Compression:

Stored size: 795 Bytes

Contents

module Liquid
  class Tag
    attr_reader :nodelist, :tag_name, :line_number, :parse_context
    alias_method :options, :parse_context
    include ParserSwitching

    class << self
      def parse(tag_name, markup, tokenizer, options)
        tag = new(tag_name, markup, options)
        tag.parse(tokenizer)
        tag
      end

      private :new
    end

    def initialize(tag_name, markup, parse_context)
      @tag_name   = tag_name
      @markup     = markup
      @parse_context = parse_context
      @line_number = parse_context.line_number
    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

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
liquid-4.0.4 lib/liquid/tag.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/liquid-4.0.3/lib/liquid/tag.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/liquid-4.0.3/lib/liquid/tag.rb
liquid-4.0.3 lib/liquid/tag.rb
liquid-4.0.2 lib/liquid/tag.rb
liquid-4-0-2-4.0.2 lib/liquid/tag.rb
liquid-4.0.1 lib/liquid/tag.rb
liquid-4.0.0 lib/liquid/tag.rb
liquid-4.0.0.rc3 lib/liquid/tag.rb
liquid-4.0.0.rc2 lib/liquid/tag.rb
liquid-4.0.0.rc1 lib/liquid/tag.rb