Class: JMESPath::Token Private
- Inherits:
-
Struct
- Object
- Struct
- JMESPath::Token
- Defined in:
- lib/jmespath/token.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- NULL_TOKEN =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Token.new(:eof, '', nil)
- BINDING_POWER =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
binding power
{ :eof => 0, :quoted_identifier => 0, :identifier => 0, :rbracket => 0, :rparen => 0, :comma => 0, :rbrace => 0, :number => 0, :current => 0, :expref => 0, :pipe => 1, :comparator => 2, :or => 5, :flatten => 6, :star => 20, :dot => 40, :lbrace => 50, :filter => 50, :lbracket => 50, :lparen => 60, }
Instance Attribute Summary collapse
-
#binding_power ⇒ Object
Returns the value of attribute binding_power.
-
#position ⇒ Object
Returns the value of attribute position.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type, value, position) ⇒ Token
constructor
private
A new instance of Token.
Constructor Details
#initialize(type, value, position) ⇒ Token
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Token.
36 37 38 |
# File 'lib/jmespath/token.rb', line 36 def initialize(type, value, position) super(type, value, position, BINDING_POWER[type]) end |
Instance Attribute Details
#binding_power ⇒ Object
Returns the value of attribute binding_power
3 4 5 |
# File 'lib/jmespath/token.rb', line 3 def binding_power @binding_power end |
#position ⇒ Object
Returns the value of attribute position
3 4 5 |
# File 'lib/jmespath/token.rb', line 3 def position @position end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/jmespath/token.rb', line 3 def type @type end |
#value ⇒ Object
Returns the value of attribute value
3 4 5 |
# File 'lib/jmespath/token.rb', line 3 def value @value end |