Class: Liquid::Raw

Inherits:
Block show all
Defined in:
lib/liquid/tags/raw.rb

Constant Summary

Constants inherited from Block

Block::ContentOfVariable, Block::FullToken, Block::IsTag, Block::IsVariable

Instance Attribute Summary

Attributes inherited from Tag

#context, #nodelist

Instance Method Summary collapse

Methods inherited from Block

#block_delimiter, #block_name, #create_variable, #end_tag, #render, #unknown_tag

Methods inherited from Tag

#initialize, #name, #render

Constructor Details

This class inherits a constructor from Liquid::Tag

Instance Method Details

#parse(tokens) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/liquid/tags/raw.rb', line 3

def parse(tokens)
  @nodelist ||= []
  @nodelist.clear

  while token = tokens.shift
    if token =~ FullToken
      if block_delimiter == $1
        end_tag
        return
      end
    end
    @nodelist << token if not token.empty?
  end
end