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 41

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 36

alias dump dump_response

.dump_call(methodName, *params)

[ GitHub ]

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

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 24

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

.load(stringOrReadable)

Alias for .load_response.

[ GitHub ]

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

alias load load_response

.load_call(stringOrReadable)

[ GitHub ]

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

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

.load_response(stringOrReadable) Also known as: .load

[ GitHub ]

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

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

Instance Method Details

#dump_call(methodName, *params)

[ GitHub ]

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

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

#dump_response(param)

[ GitHub ]

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

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 55

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

#load_response(stringOrReadable)

Returns paramOrFault

[ GitHub ]

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

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