Class
The writer adapter class
Class Methods
::
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/net/protocol.rb, line 450
def initialize(writer)
@writer = writer
end
No documentation available
Instance Methods
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/net/protocol.rb, line 464
def <<(str)
write str
self
end
No documentation available
#
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/net/protocol.rb, line 454
def inspect
"#<#{self.class} writer=#{@writer.inspect}>"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/net/protocol.rb, line 473
def printf(*args)
write sprintf(*args)
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/net/protocol.rb, line 469
def puts(str = '')
write str.chomp("\n") + "\n"
end
No documentation available
lib/net/protocol.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/net/protocol.rb, line 458
def write(str)
@writer.call(str)
end
No documentation available