Class: InterMine::Results::JsonReader

Inherits:
ResultsReader show all
Includes:
Enumerable
Defined in:
lib/intermine/results.rb

Direct Known Subclasses

SeqReader

Instance Method Summary collapse

Methods inherited from ResultsReader

#each_result, #each_row, #each_summary, #get_size, #initialize, #read_result_set

Constructor Details

This class inherits a constructor from InterMine::Results::ResultsReader

Instance Method Details

#eachObject


403
404
405
406
407
408
409
# File 'lib/intermine/results.rb', line 403

def each
    processor = lambda { |line|
        x = line.chomp.chomp(",")
        x.empty? ? nil : JSON.parse(x)
    }
    read_result_set(params("json"), processor) { |x| yield x }
end