Class: Tokenzr::Token
- Inherits:
-
Object
- Object
- Tokenzr::Token
- Defined in:
- lib/tokenzr/token.rb
Overview
token representation
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(content = nil, type = nil, line = nil, column = nil) ⇒ Token
constructor
A new instance of Token.
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
#column ⇒ Object (readonly)
Returns the value of attribute column.
6 7 8 |
# File 'lib/tokenzr/token.rb', line 6 def column @column end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/tokenzr/token.rb', line 6 def content @content end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/tokenzr/token.rb', line 6 def line @line end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/tokenzr/token.rb', line 6 def type @type end |