Class: HTTPX::Request::ProcIO

Inherits:
Object
  • Object
show all
Defined in:
lib/httpx/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ ProcIO

Returns a new instance of ProcIO.



234
235
236
# File 'lib/httpx/request.rb', line 234

def initialize(block)
  @block = block
end

Instance Method Details

#write(data) ⇒ Object



238
239
240
241
# File 'lib/httpx/request.rb', line 238

def write(data)
  @block.call(data)
  data.bytesize
end