Class: Liquid::Token

Inherits:
String show all
Defined in:
lib/liquid/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#to_liquid

Constructor Details

#initialize(content, line_number) ⇒ Token

Returns a new instance of Token.



5
6
7
8
# File 'lib/liquid/token.rb', line 5

def initialize(content, line_number)
  super(content)
  @line_number = line_number
end

Instance Attribute Details

#line_numberObject (readonly)

Returns the value of attribute line_number.



3
4
5
# File 'lib/liquid/token.rb', line 3

def line_number
  @line_number
end

Instance Method Details

#child(string) ⇒ Object



14
15
16
# File 'lib/liquid/token.rb', line 14

def child(string)
  Token.new(string, @line_number)
end

#rawObject



10
11
12
# File 'lib/liquid/token.rb', line 10

def raw
  "<raw>"
end