類別 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
print(str)
別名為: write
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