Class: HTTP::Features::AutoDeflate::GzippedBody::BlockIO
- Inherits:
-
Object
- Object
- HTTP::Features::AutoDeflate::GzippedBody::BlockIO
- Defined in:
- lib/http/features/auto_deflate.rb
Overview
IO adapter that delegates writes to a block
Instance Method Summary collapse
-
#initialize(block) ⇒ BlockIO
constructor
Initializes a block-based IO adapter.
-
#write(data) ⇒ Object
Writes data by calling the block.
Constructor Details
#initialize(block) ⇒ BlockIO
Initializes a block-based IO adapter
191 192 193 |
# File 'lib/http/features/auto_deflate.rb', line 191 def initialize(block) @block = block end |
Instance Method Details
#write(data) ⇒ Object
Writes data by calling the block
203 204 205 |
# File 'lib/http/features/auto_deflate.rb', line 203 def write(data) @block.call(data) end |