Class: Tb::JSONReader
- Inherits:
-
HashReader
- Object
- HashReader
- Tb::JSONReader
- Defined in:
- lib/tb/json.rb
Instance Method Summary collapse
-
#initialize(io) ⇒ JSONReader
constructor
A new instance of JSONReader.
Methods inherited from HashReader
#get_hash, #get_named_header, #header_and_each, #header_known?, #update_header
Methods included from EnumerableWithEach
Methods included from Enumerable
#cat, #extsort_by, #natjoin2, #natjoin2_outer, #newfield, #to_fileenumerator, #with_cumulative_header, #with_header, #write_to_csv, #write_to_json, #write_to_ltsv, #write_to_pnm, #write_to_tsv, #write_with
Constructor Details
#initialize(io) ⇒ JSONReader
Returns a new instance of JSONReader.
33 34 35 36 |
# File 'lib/tb/json.rb', line 33 def initialize(io) ary = JSON.parse(io.read) super lambda { ary.shift } end |