Class: JsonSequence::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/json_sequence/parser.rb

Constant Summary collapse

RS =
"\x1E".freeze

Instance Method Summary collapse

Constructor Details

#initializeParser

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