Class
The writer adapter class
Class Methods
::
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/net/protocol.rb, line 487
def initialize(writer)
@writer = writer
end
No documentation available
Instance Methods
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/net/protocol.rb, line 501
def <<(str)
write str
self
end
No documentation available
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/net/protocol.rb, line 491
def inspect
"#<#{self.class} writer=#{@writer.inspect}>"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/net/protocol.rb, line 510
def printf(*args)
write sprintf(*args)
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/net/protocol.rb, line 506
def puts(str = '')
write str.chomp("\n") + "\n"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/net/protocol.rb, line 495
def write(str)
@writer.call(str)
end
No documentation available