123456789_123456789_123456789_123456789_123456789_

Class: XMLRPC::Marshal

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: lib/xmlrpc/marshal.rb

Overview

Class Method Summary

Instance Method Summary

ParserWriterChooseMixin - Included

#set_parser

Sets the XMLParser to use for parsing XML documents.

#set_writer

Sets the XMLWriter to use for generating XML output.

#create, #parser

Constructor Details

.new(parser = nil, writer = nil) ⇒ Marshal

class self

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 42

def initialize( parser = nil, writer = nil )
  set_parser( parser )
  set_writer( writer )
end

Class Method Details

.dump(param)

Alias for .dump_response.

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 37

alias dump dump_response

.dump_call(methodName, *params)

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 21

def dump_call( methodName, *params )
  new.dump_call( methodName, *params )
end

.dump_response(param) Also known as: .dump

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 25

def dump_response( param )
  new.dump_response( param )
end

.load(stringOrReadable)

Alias for .load_response.

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 38

alias load load_response

.load_call(stringOrReadable)

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 29

def load_call( stringOrReadable )
  new.load_call( stringOrReadable )
end

.load_response(stringOrReadable) Also known as: .load

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 33

def load_response( stringOrReadable )
  new.load_response( stringOrReadable )
end

Instance Method Details

#dump_call(methodName, *params)

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 47

def dump_call( methodName, *params )
  create.methodCall( methodName, *params )
end

#dump_response(param)

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 51

def dump_response( param )
  create.methodResponse( ! param.kind_of?( XMLRPC::FaultException ) , param )
end

#load_call(stringOrReadable)

Returns [ methodname, params ]

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 56

def load_call( stringOrReadable )
  parser.parseMethodCall( stringOrReadable )
end

#load_response(stringOrReadable)

Returns paramOrFault

[ GitHub ]

  
# File 'lib/xmlrpc/marshal.rb', line 61

def load_response( stringOrReadable )
  parser.parseMethodResponse( stringOrReadable )[1]
end