Class: XMLRPC::StreamWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/stream_writer.rb

Constant Summary collapse

WRITE_BUFFER_SIZE =
33972

Instance Method Summary collapse

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

Returns:

  • (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