Class: XMLRPC::StreamWriter
- Inherits:
-
Object
- Object
- XMLRPC::StreamWriter
- Defined in:
- lib/stream_writer.rb
Constant Summary collapse
- WRITE_BUFFER_SIZE =
33972
Instance Method Summary collapse
- #has_streams? ⇒ Boolean
-
#initialize(io) ⇒ StreamWriter
constructor
Create a write with a given IO.
- #methodCall(name, *params) ⇒ Object
Constructor Details
#initialize(io) ⇒ StreamWriter
Create a write with a given IO
10 11 12 |
# File 'lib/stream_writer.rb', line 10 def initialize(io) @io = io end |
Instance Method Details
#has_streams? ⇒ Boolean
13 14 15 16 |
# File 'lib/stream_writer.rb', line 13 def has_streams? @had_a_stream ||= false @had_a_stream end |
#methodCall(name, *params) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/stream_writer.rb', line 17 def methodCall(name, *params) @io << '<?xml version="1.0" ?><methodCall><methodName>' @io << name @io << '</methodName><params>' params.each do |param| @io << "<param>" conv2value(param) @io << "</param>" end @io << '</params></methodCall>' end |