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
42 43 44 45 |
# File 'lib/xmlrpc/marshal.rb', line 42 def initialize( parser = nil, writer = nil ) set_parser( parser ) set_writer( writer ) end |
Class Method Details
.dump ⇒ Object
37 38 39 |
# File 'lib/xmlrpc/marshal.rb', line 37 def dump_response( param ) new.dump_response( param ) end |
.dump_call(methodName, *params) ⇒ Object
21 22 23 |
# File 'lib/xmlrpc/marshal.rb', line 21 def dump_call( methodName, *params ) new.dump_call( methodName, *params ) end |
.dump_response(param) ⇒ Object
25 26 27 |
# File 'lib/xmlrpc/marshal.rb', line 25 def dump_response( param ) new.dump_response( param ) end |
.load ⇒ Object
38 39 40 |
# File 'lib/xmlrpc/marshal.rb', line 38 def load_response( stringOrReadable ) new.load_response( stringOrReadable ) end |
.load_call(stringOrReadable) ⇒ Object
29 30 31 |
# File 'lib/xmlrpc/marshal.rb', line 29 def load_call( stringOrReadable ) new.load_call( stringOrReadable ) end |
.load_response(stringOrReadable) ⇒ Object
33 34 35 |
# File 'lib/xmlrpc/marshal.rb', line 33 def load_response( stringOrReadable ) new.load_response( stringOrReadable ) end |
Instance Method Details
#dump_call(methodName, *params) ⇒ Object
47 48 49 |
# File 'lib/xmlrpc/marshal.rb', line 47 def dump_call( methodName, *params ) create.methodCall( methodName, *params ) end |
#dump_response(param) ⇒ Object
51 52 53 |
# File 'lib/xmlrpc/marshal.rb', line 51 def dump_response( param ) create.methodResponse( ! param.kind_of?( XMLRPC::FaultException ) , param ) end |
#load_call(stringOrReadable) ⇒ Object
Returns [ methodname, params ]
56 57 58 |
# File 'lib/xmlrpc/marshal.rb', line 56 def load_call( stringOrReadable ) parser.parseMethodCall( stringOrReadable ) end |
#load_response(stringOrReadable) ⇒ Object
Returns paramOrFault
61 62 63 |
# File 'lib/xmlrpc/marshal.rb', line 61 def load_response( stringOrReadable ) parser.parseMethodResponse( stringOrReadable )[1] end |