类 Net::WriteAdapter
写入适配器类
公共类方法
new(writer) 点击切换源代码
# File lib/net/protocol.rb, line 487 def initialize(writer) @writer = writer end
公共实例方法
<<(str) 点击切换源代码
# File lib/net/protocol.rb, line 501 def <<(str) write str self end
inspect() 点击切换源代码
# File lib/net/protocol.rb, line 491 def inspect "#<#{self.class} writer=#{@writer.inspect}>" end
printf(*args) 点击切换源代码
# File lib/net/protocol.rb, line 510 def printf(*args) write sprintf(*args) end
puts(str = '') 点击切换源代码
# File lib/net/protocol.rb, line 506 def puts(str = '') write str.chomp("\n") + "\n" end
write(str) 点击切换源代码
# File lib/net/protocol.rb, line 495 def write(str) @writer.call(str) end
也称为别名:print