Class: Net::ReadAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/net/protocol.rb

Overview

Signature:

  • nodoc: internal use only

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ ReadAdapter

Returns a new instance of ReadAdapter.



571
572
573
# File 'lib/net/protocol.rb', line 571

def initialize(block)
  @block = block
end

Instance Method Details

#<<(str) ⇒ Object



579
580
581
# File 'lib/net/protocol.rb', line 579

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

#inspectObject



575
576
577
# File 'lib/net/protocol.rb', line 575

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