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.
15 16 17 18 |
# File 'lib/jrf/cli/runner.rb', line 15 def initialize @buf = +"" @offset = 0 end |
Instance Method Details
#append(chunk) ⇒ Object
20 21 22 |
# File 'lib/jrf/cli/runner.rb', line 20 def append(chunk) @buf << chunk end |
#each_payload ⇒ Object
24 25 26 27 28 |
# File 'lib/jrf/cli/runner.rb', line 24 def each_payload while (payload = next_payload) yield payload end end |
#has_partial? ⇒ Boolean
30 31 32 |
# File 'lib/jrf/cli/runner.rb', line 30 def has_partial? @offset != @buf.bytesize end |