Class: XMLRPC::Marshal
- Inherits:
-
Object
- Object
- XMLRPC::Marshal
- Includes:
- ParserWriterChooseMixin
- Defined in:
- lib/xmlrpc/marshal.rb
Overview
Marshalling of XMLRPC::Create#methodCall and XMLRPC::Create#methodResponse
Class Method Summary collapse
- .dump ⇒ Object
- .dump_call(methodName, *params) ⇒ Object
- .dump_response(param) ⇒ Object
- .load ⇒ Object
- .load_call(stringOrReadable) ⇒ Object
- .load_response(stringOrReadable) ⇒ Object
Instance Method Summary collapse
- #dump_call(methodName, *params) ⇒ Object
- #dump_response(param) ⇒ Object
-
#initialize(parser = nil, writer = nil) ⇒ Marshal
constructor
class self.
-
#load_call(stringOrReadable) ⇒ Object
Returns
[ methodname, params ]
. -
#load_response(stringOrReadable) ⇒ Object
Returns
paramOrFault
.
Methods included from ParserWriterChooseMixin
Constructor Details
#initialize(parser = nil, writer = nil) ⇒ Marshal
class self
41 42 43 44 |
# File 'lib/xmlrpc/marshal.rb', line 41 def initialize( parser = nil, writer = nil ) set_parser( parser ) set_writer( writer ) end |
Class Method Details
.dump ⇒ Object
36 37 38 |
# File 'lib/xmlrpc/marshal.rb', line 36 def dump_response( param ) new.dump_response( param ) end |
.dump_call(methodName, *params) ⇒ Object
20 21 22 |
# File 'lib/xmlrpc/marshal.rb', line 20 def dump_call( methodName, *params ) new.dump_call( methodName, *params ) end |
.dump_response(param) ⇒ Object
24 25 26 |
# File 'lib/xmlrpc/marshal.rb', line 24 def dump_response( param ) new.dump_response( param ) end |
.load ⇒ Object
37 38 39 |
# File 'lib/xmlrpc/marshal.rb', line 37 def load_response( stringOrReadable ) new.load_response( stringOrReadable ) end |
.load_call(stringOrReadable) ⇒ Object
28 29 30 |
# File 'lib/xmlrpc/marshal.rb', line 28 def load_call( stringOrReadable ) new.load_call( stringOrReadable ) end |
.load_response(stringOrReadable) ⇒ Object
32 33 34 |
# File 'lib/xmlrpc/marshal.rb', line 32 def load_response( stringOrReadable ) new.load_response( stringOrReadable ) end |
Instance Method Details
#dump_call(methodName, *params) ⇒ Object
46 47 48 |
# File 'lib/xmlrpc/marshal.rb', line 46 def dump_call( methodName, *params ) create.methodCall( methodName, *params ) end |
#dump_response(param) ⇒ Object
50 51 52 |
# File 'lib/xmlrpc/marshal.rb', line 50 def dump_response( param ) create.methodResponse( ! param.kind_of?( XMLRPC::FaultException ) , param ) end |
#load_call(stringOrReadable) ⇒ Object
Returns [ methodname, params ]
55 56 57 |
# File 'lib/xmlrpc/marshal.rb', line 55 def load_call( stringOrReadable ) parser.parseMethodCall( stringOrReadable ) end |
#load_response(stringOrReadable) ⇒ Object
Returns paramOrFault
60 61 62 |
# File 'lib/xmlrpc/marshal.rb', line 60 def load_response( stringOrReadable ) parser.parseMethodResponse( stringOrReadable )[1] end |