class Net::BufferedIO::WriteAdapter

The writer adapter class

Public Class Methods

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

Public Instance Methods

<<(str) click to toggle source
# File lib/net/protocol.rb, line 395
def <<(str)
  write str
  self
end
inspect() click to toggle source
# File lib/net/protocol.rb, line 385
def inspect
  "#<#{self.class} socket=#{@socket.inspect}>"
end
print(str)
Alias for: write
printf(*args) click to toggle source
# File lib/net/protocol.rb, line 404
def printf(*args)
  write sprintf(*args)
end
puts(str = '') click to toggle source
# File lib/net/protocol.rb, line 400
def puts(str = '')
  write str.chomp("\n") + "\n"
end
write(str) click to toggle source
# File lib/net/protocol.rb, line 389
def write(str)
  @socket.__send__(@method_id, str)
end
Also aliased as: print