In Files

  • net/protocol.rb

Parent

Class/Module Index [+]

Quicksearch

Net::WriteAdapter

The writer adapter class

Public Class Methods

new(socket, method) click to toggle source
 
               # File net/protocol.rb, line 450
def initialize(socket, method)
  @socket = socket
  @method_id = method
end
            

Public Instance Methods

<<(str) click to toggle source
 
               # File net/protocol.rb, line 465
def <<(str)
  write str
  self
end
            
inspect() click to toggle source
 
               # File net/protocol.rb, line 455
def inspect
  "#<#{self.class} socket=#{@socket.inspect}>"
end
            
printf(*args) click to toggle source
 
               # File net/protocol.rb, line 474
def printf(*args)
  write sprintf(*args)
end
            
puts(str = '') click to toggle source
 
               # File net/protocol.rb, line 470
def puts(str = '')
  write str.chomp("\n") + "\n"
end
            
write(str) click to toggle source
 
               # File net/protocol.rb, line 459
def write(str)
  @socket.__send__(@method_id, str)
end
            
Also aliased as: print
There is an updated format of the API docs for this version here.