Class: Docker::API::Stream::Raw
- Inherits:
-
Object
- Object
- Docker::API::Stream::Raw
- Defined in:
- lib/docker/api/stream.rb
Overview
Passes bytes straight through, for TTY-enabled streams and for raw archive downloads where there is no framing to undo.
Instance Method Summary collapse
- #<<(chunk) ⇒ self
-
#initialize {|chunk| ... } ⇒ Raw
constructor
A new instance of Raw.
Constructor Details
#initialize {|chunk| ... } ⇒ Raw
Returns a new instance of Raw.
127 128 129 130 131 |
# File 'lib/docker/api/stream.rb', line 127 def initialize(&block) raise ArgumentError, "Raw needs a block to yield chunks to" unless block @block = block end |
Instance Method Details
#<<(chunk) ⇒ self
135 136 137 138 |
# File 'lib/docker/api/stream.rb', line 135 def <<(chunk) @block.call(chunk) self end |