Class: PGN::Lexer::Token
- Inherits:
-
Struct
- Object
- Struct
- PGN::Lexer::Token
- Defined in:
- lib/pgn/lexer.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line
20 21 22 |
# File 'lib/pgn/lexer.rb', line 20 def line @line end |
#offset ⇒ Object
Returns the value of attribute offset
20 21 22 |
# File 'lib/pgn/lexer.rb', line 20 def offset @offset end |
#type ⇒ Object
Returns the value of attribute type
20 21 22 |
# File 'lib/pgn/lexer.rb', line 20 def type @type end |
#value ⇒ Object
Returns the value of attribute value
20 21 22 |
# File 'lib/pgn/lexer.rb', line 20 def value @value end |
Instance Method Details
#inspect ⇒ Object
21 22 23 |
# File 'lib/pgn/lexer.rb', line 21 def inspect "#<PGN::Lexer::Token #{type.inspect} value=#{value.inspect} @#{offset} L#{line}>" end |