Class: Net::ReadAdapter

Inherits:
Object show all
Defined in:
lib/extensions/net-http/net/protocol.rb

Overview

:nodoc: internal use only

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ ReadAdapter

Returns a new instance of ReadAdapter.



371
372
373
# File 'lib/extensions/net-http/net/protocol.rb', line 371

def initialize(block)
  @block = block
end

Instance Method Details

#<<(str) ⇒ Object



379
380
381
# File 'lib/extensions/net-http/net/protocol.rb', line 379

def <<(str)
  call_block(str, &@block) if @block
end

#inspectObject



375
376
377
# File 'lib/extensions/net-http/net/protocol.rb', line 375

def inspect
  "#<#{self.class}>"
end