Class: Parselly::Lexer::TokenValue

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#positionObject

Returns the value of attribute position

Returns:

  • (Object)

    the current value of position



19
20
21
# File 'lib/parselly/lexer.rb', line 19

def position
  @position
end

#quoteObject

Returns the value of attribute quote

Returns:

  • (Object)

    the current value of quote



19
20
21
# File 'lib/parselly/lexer.rb', line 19

def quote
  @quote
end

#rawObject

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of raw



19
20
21
# File 'lib/parselly/lexer.rb', line 19

def raw
  @raw
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



19
20
21
# File 'lib/parselly/lexer.rb', line 19

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



24
25
26
# File 'lib/parselly/lexer.rb', line 24

def ==(other)
  other.respond_to?(:value) ? value == other.value : value == other
end

#to_sObject



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

def to_s
  value.to_s
end