Class: PGN::Lexer::Token

Inherits:
Struct
  • Object
show all
Defined in:
lib/pgn/lexer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



20
21
22
# File 'lib/pgn/lexer.rb', line 20

def line
  @line
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



20
21
22
# File 'lib/pgn/lexer.rb', line 20

def offset
  @offset
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



20
21
22
# File 'lib/pgn/lexer.rb', line 20

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



20
21
22
# File 'lib/pgn/lexer.rb', line 20

def value
  @value
end

Instance Method Details

#inspectObject



21
22
23
# File 'lib/pgn/lexer.rb', line 21

def inspect
  "#<PGN::Lexer::Token #{type.inspect} value=#{value.inspect} @#{offset} L#{line}>"
end