Class: Hurley::BodyReceiver
- Inherits:
-
Object
- Object
- Hurley::BodyReceiver
- Defined in:
- lib/hurley/client.rb
Instance Method Summary collapse
- #call(res, chunk) ⇒ Object
-
#initialize ⇒ BodyReceiver
constructor
A new instance of BodyReceiver.
- #join ⇒ Object
Constructor Details
#initialize ⇒ BodyReceiver
Returns a new instance of BodyReceiver.
338 339 340 |
# File 'lib/hurley/client.rb', line 338 def initialize @chunks = [] end |
Instance Method Details
#call(res, chunk) ⇒ Object
342 343 344 |
# File 'lib/hurley/client.rb', line 342 def call(res, chunk) @chunks << chunk end |
#join ⇒ Object
346 347 348 |
# File 'lib/hurley/client.rb', line 346 def join @chunks.join end |