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 Method Summary collapse
- #current ⇒ Object private
-
#initialize(chars) ⇒ CharacterStream
constructor
private
A new instance of CharacterStream.
- #next ⇒ Object private
- #position ⇒ 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.
311 312 313 314 |
# File 'lib/jmespath/lexer.rb', line 311 def initialize(chars) @chars = chars @position = 0 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.
316 317 318 |
# File 'lib/jmespath/lexer.rb', line 316 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.
320 321 322 323 |
# File 'lib/jmespath/lexer.rb', line 320 def next @position += 1 @chars[@position] end |
#position ⇒ 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.
325 326 327 |
# File 'lib/jmespath/lexer.rb', line 325 def position @position end |