Class: Jrf::CLI::Runner::ParallelFrameReader
- Inherits:
-
Object
- Object
- Jrf::CLI::Runner::ParallelFrameReader
- Defined in:
- lib/jrf/cli/runner.rb
Instance Method Summary collapse
- #append(chunk) ⇒ Object
- #each_payload ⇒ Object
- #has_partial? ⇒ Boolean
-
#initialize ⇒ ParallelFrameReader
constructor
A new instance of ParallelFrameReader.
Constructor Details
#initialize ⇒ ParallelFrameReader
Returns a new instance of ParallelFrameReader.
34 35 36 37 |
# File 'lib/jrf/cli/runner.rb', line 34 def initialize @buf = +"" @offset = 0 end |
Instance Method Details
#append(chunk) ⇒ Object
39 40 41 |
# File 'lib/jrf/cli/runner.rb', line 39 def append(chunk) @buf << chunk end |
#each_payload ⇒ Object
43 44 45 46 47 |
# File 'lib/jrf/cli/runner.rb', line 43 def each_payload while (payload = next_payload) yield payload end end |
#has_partial? ⇒ Boolean
49 50 51 |
# File 'lib/jrf/cli/runner.rb', line 49 def has_partial? @offset != @buf.bytesize end |