Class: Liquid::Tag

### Home Classes Methods

### In Files

- lib/liquid/tag.rb

### Parent

Object

### Methods

- ::new
- ::new_with_options
- #blank?
- #name
- #parse
- #parse_with_selected_parser
- #render

### Class/Module Index

Quicksearch

- Liquid
- Liquid::ArgumentError
- Liquid::Assign
- Liquid::BlankFileSystem
- Liquid::Block
- Liquid::Break
- Liquid::BreakInterrupt
- Liquid::Capture
- Liquid::Case
- Liquid::Comment
- Liquid::Context
- Liquid::ContextError
- Liquid::Continue
- Liquid::ContinueInterrupt
- Liquid::Cycle
- Liquid::Decrement
- Liquid::Document
- Liquid::Drop
- Liquid::ElseCondition
- Liquid::Error
- Liquid::FileSystemError
- Liquid::FilterNotFound
- Liquid::For
- Liquid::I18n
- Liquid::I18n::TranslationError
- Liquid::If
- Liquid::Ifchanged
- Liquid::Include
- Liquid::Increment
- Liquid::Interrupt
- Liquid::Lexer
- Liquid::LocalFileSystem
- Liquid::MemoryError
- Liquid::Parser
- Liquid::Raw
- Liquid::StackLevelError
- Liquid::StandardError
- Liquid::StandardFilters
- Liquid::SyntaxError
- Liquid::TableRow
- Liquid::Tag
- Liquid::Template
- Liquid::Unless
- Liquid::Utils
- Liquid::Variable
- FalseClass
- LiquidView
- Module
- NilClass
- TrueClass

No matching classes.

# 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.