Method: GnipApi::Apis::PowerTrack::Stream#consume
- Defined in:
- lib/gnip_api/apis/power_track/stream.rb
#consume ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gnip_api/apis/power_track/stream.rb', line 18 def consume request = create_request adapter.stream_get request do |chunk| @buffer.insert! chunk begin yield process_entries(@buffer.read!) rescue Exception => e puts e.class puts e. puts e.backtrace[0..10].join("\n") raise e end end end |