class Net::WriteAdapter
The writer adapter class
Public Class Methods
# File lib/net/protocol.rb, line 448 def initialize(socket, method) @socket = socket @method_id = method end
Public Instance Methods
# File lib/net/protocol.rb, line 463 def <<(str) write str self end
# File lib/net/protocol.rb, line 453
def inspect
"#<#{self.class} socket=#{@socket.inspect}>"
end print(str)
Alias for: write
# File lib/net/protocol.rb, line 472 def printf(*args) write sprintf(*args) end
# File lib/net/protocol.rb, line 468
def puts(str = '')
write str.chomp("\n") + "\n"
end # File lib/net/protocol.rb, line 457 def write(str) @socket.__send__(@method_id, str) end
Also aliased as: print
Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.