class Net::WriteAdapter

The writer adapter class

Public Class Methods

new (writer)
# File lib/net/protocol.rb, line 487
def initialize(writer)
  @writer = writer
end

Public Instance Methods

<< (str)
# File lib/net/protocol.rb, line 501
def <<(str)
  write str
  self
end
inspect ()
# File lib/net/protocol.rb, line 491
def inspect
  "#<#{self.class} writer=#{@writer.inspect}>"
end
print (str)
Alias for: write
printf (*args)
# File lib/net/protocol.rb, line 510
def printf(*args)
  write sprintf(*args)
end
puts (str = '')
# File lib/net/protocol.rb, line 506
def puts(str = '')
  write str.chomp("\n") + "\n"
end
write (str)
# File lib/net/protocol.rb, line 495
def write(str)
  @writer.call(str)
end
Also aliased as: print