Class
The writer adapter class
Class Methods
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.5.9/lib/net/protocol.rb, line 384
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.5.9/lib/net/protocol.rb, line 399
def <<(str)
write str
self
end
No documentation available
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.5.9/lib/net/protocol.rb, line 389
def inspect
"#<#{self.class} socket=#{@socket.inspect}>"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.5.9/lib/net/protocol.rb, line 408
def printf(*args)
write sprintf(*args)
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.5.9/lib/net/protocol.rb, line 404
def puts(str = '')
write str.chomp("\n") + "\n"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-2.5.9/lib/net/protocol.rb, line 393
def write(str)
@socket.__send__(@method_id, str)
end
No documentation available