Class: JMESPath::Lexer::CharacterStream Private
- Inherits:
-
Object
- Object
- JMESPath::Lexer::CharacterStream
- Defined in:
- lib/jmespath/lexer.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.
Instance Attribute Summary collapse
- #position ⇒ Object readonly private
Instance Method Summary collapse
- #current ⇒ Object private
-
#initialize(chars) ⇒ CharacterStream
constructor
private
A new instance of CharacterStream.
- #next ⇒ Object private
Constructor Details
#initialize(chars) ⇒ CharacterStream
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 CharacterStream.
365 366 367 368 |
# File 'lib/jmespath/lexer.rb', line 365 def initialize(chars) @chars = chars @position = 0 end |
Instance Attribute Details
#position ⇒ Object (readonly)
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.
379 380 381 |
# File 'lib/jmespath/lexer.rb', line 379 def position @position end |
Instance Method Details
#current ⇒ Object
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.
370 371 372 |
# File 'lib/jmespath/lexer.rb', line 370 def current @chars[@position] end |
#next ⇒ Object
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.
374 375 376 377 |
# File 'lib/jmespath/lexer.rb', line 374 def next @position += 1 @chars[@position] end |