Class: Ruact::Testing::FlightWireParser
- Inherits:
-
Object
- Object
- Ruact::Testing::FlightWireParser
- Defined in:
- lib/ruact/testing/flight_wire_parser.rb
Overview
Parses a Flight wire byte string into an ordered array of row records.
Used by the structural Flight matchers to assert on parsed semantics
rather than literal bytes. Pure function — no I/O, no global state, no
Thread.current.
Class Method Summary collapse
-
.parse(wire) ⇒ Array<Hash>
Parse a complete Flight wire byte string.
Class Method Details
.parse(wire) ⇒ Array<Hash>
Parse a complete Flight wire byte string.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ruact/testing/flight_wire_parser.rb', line 40 def self.parse(wire) rows = [] scanner = StringScanner.new(wire) until scanner.eos? start_offset = scanner.pos rows << parse_row(scanner, start_offset) end rows end |