Class
The writer adapter class
Class Methods
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/net/protocol.rb, line 448
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-2.7.6/lib/net/protocol.rb, line 463
def <<(str)
write str
self
end
No documentation available
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/net/protocol.rb, line 453
def inspect
"#<#{self.class} socket=#{@socket.inspect}>"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/net/protocol.rb, line 472
def printf(*args)
write sprintf(*args)
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/net/protocol.rb, line 468
def puts(str = '')
write str.chomp("\n") + "\n"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/net/protocol.rb, line 457
def write(str)
@socket.__send__(@method_id, str)
end
No documentation available