Class: Net::ReadAdapter

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

Overview

:nodoc: internal use only

Instance Method Summary (collapse)

Constructor Details

- (ReadAdapter) initialize(block)

A new instance of ReadAdapter



376
377
378
# File 'lib/net/protocol.rb', line 376

def initialize(block)
  @block = block
end

Instance Method Details

- (Object) <<(str)



384
385
386
# File 'lib/net/protocol.rb', line 384

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

- (Object) inspect



380
381
382
# File 'lib/net/protocol.rb', line 380

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