Class: Tokenzr::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/tokenzr/token.rb

Overview

token representation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content = nil, type = nil, line = nil, column = nil) ⇒ Token

Returns a new instance of Token.



8
9
10
11
12
13
# File 'lib/tokenzr/token.rb', line 8

def initialize(content = nil, type = nil, line = nil, column = nil)
  @content = content
  @type = type
  @line = line
  @column = column
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



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

def column
  @column
end

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

#lineObject (readonly)

Returns the value of attribute line.



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

def line
  @line
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end