Class: Fibrio::Parsers::JSON

Inherits:
Base
  • Object
show all
Defined in:
lib/fibrio/parsers/json.rb

Constant Summary collapse

HEX_DIGITS =
/\A[0-9a-fA-F]\z/
NUMBER_START =
/\A[-0-9]\z/

Constants inherited from Base

Base::WHITESPACE

Instance Method Summary collapse

Methods inherited from Base

#close, #initialize

Constructor Details

This class inherits a constructor from Fibrio::Parsers::Base

Instance Method Details

#run {|record| ... } ⇒ Object

Yields:

  • (record)


10
11
12
13
14
15
16
# File 'lib/fibrio/parsers/json.rb', line 10

def run(&)
  path = normalized_path
  return run_path(path, &) if path

  parse_root_array(&)
  ensure_end_of_input
end