Class: Net::ReadAdapter

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

Overview

:nodoc: internal use only

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ ReadAdapter

Returns a new instance of ReadAdapter



365
366
367
# File 'lib/net/protocol.rb', line 365

def initialize(block)
  @block = block
end

Instance Method Details

#<<(str) ⇒ Object



373
374
375
# File 'lib/net/protocol.rb', line 373

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

#inspectObject



369
370
371
# File 'lib/net/protocol.rb', line 369

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