Class: JsonSequence::Parser
- Inherits:
-
Object
- Object
- JsonSequence::Parser
- Defined in:
- lib/json_sequence/parser.rb
Constant Summary collapse
- RS =
"\x1E".freeze
Instance Method Summary collapse
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #parse(chunk, &block) ⇒ Object
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
8 9 10 |
# File 'lib/json_sequence/parser.rb', line 8 def initialize @buffer = '' end |
Instance Method Details
#parse(chunk, &block) ⇒ Object
12 13 14 |
# File 'lib/json_sequence/parser.rb', line 12 def parse(chunk, &block) @buffer = do_parse(@buffer + chunk, &block) end |