Class: Net::WriteAdapter
- Defined in:
- lib/extensions/net-http/net/protocol.rb
Overview
The writer adapter class
Instance Method Summary collapse
- #<<(str) ⇒ Object
-
#initialize(socket, method) ⇒ WriteAdapter
constructor
A new instance of WriteAdapter.
- #inspect ⇒ Object
- #printf(*args) ⇒ Object
- #puts(str = '') ⇒ Object
- #write(str) ⇒ Object (also: #print)
Constructor Details
#initialize(socket, method) ⇒ WriteAdapter
Returns a new instance of WriteAdapter.
340 341 342 343 |
# File 'lib/extensions/net-http/net/protocol.rb', line 340 def initialize(socket, method) @socket = socket @method_id = method end |
Instance Method Details
#<<(str) ⇒ Object
355 356 357 358 |
# File 'lib/extensions/net-http/net/protocol.rb', line 355 def <<(str) write str self end |
#inspect ⇒ Object
345 346 347 |
# File 'lib/extensions/net-http/net/protocol.rb', line 345 def inspect "#<#{self.class} socket=#{@socket.inspect}>" end |
#printf(*args) ⇒ Object
364 365 366 |
# File 'lib/extensions/net-http/net/protocol.rb', line 364 def printf(*args) write sprintf(*args) end |