Class
The writer adapter class
Class Methods
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.0.5/lib/net/protocol.rb, line 450
def initialize(socket, method)
@socket = socket
@method_id = method
end
No documentation available
Instance Methods
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.0.5/lib/net/protocol.rb, line 465
def <<(str)
write str
self
end
No documentation available
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.0.5/lib/net/protocol.rb, line 455
def inspect
"#<#{self.class} socket=#{@socket.inspect}>"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.0.5/lib/net/protocol.rb, line 474
def printf(*args)
write sprintf(*args)
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.0.5/lib/net/protocol.rb, line 470
def puts(str = '')
write str.chomp("\n") + "\n"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.0.5/lib/net/protocol.rb, line 459
def write(str)
@socket.__send__(@method_id, str)
end
No documentation available