Class: Tokenzr::Token

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

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.



14
15
16
17
18
19
# File 'lib/tokenzr.rb', line 14

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.



12
13
14
# File 'lib/tokenzr.rb', line 12

def column
  @column
end

#contentObject (readonly)

Returns the value of attribute content.



12
13
14
# File 'lib/tokenzr.rb', line 12

def content
  @content
end

#lineObject (readonly)

Returns the value of attribute line.



12
13
14
# File 'lib/tokenzr.rb', line 12

def line
  @line
end

#typeObject (readonly)

Returns the value of attribute type.



12
13
14
# File 'lib/tokenzr.rb', line 12

def type
  @type
end