mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
db9445103c
* lib/wsdl/* (42 files): WSDL4R added. * lib/xsd/* (12 files): XSD4R added. * test/soap/* (16 files): added. * test/wsdl/* (2 files): added. * test/xsd/* (3 files): added. * sample/soap/* (27 files): added. * sample/wsdl/* (13 files): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
142 lines
2 KiB
Ruby
142 lines
2 KiB
Ruby
module CMarshal
|
|
class << self
|
|
public
|
|
def ruby
|
|
class << self
|
|
def dump(o)
|
|
Marshal.dump(o)
|
|
end
|
|
|
|
def load(o)
|
|
Marshal.load(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def amarshal
|
|
require 'amarshal'
|
|
class << self
|
|
def dump(o)
|
|
AMarshal.dump(o)
|
|
end
|
|
|
|
def load(o)
|
|
AMarshal.load(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def to_src
|
|
require 'to_src'
|
|
ToSrc.independent(false)
|
|
class << self
|
|
def dump(o)
|
|
ToSrc.reset
|
|
o.to_src
|
|
end
|
|
|
|
def load(o)
|
|
eval(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def to_source
|
|
require 'ToSource'
|
|
class << self
|
|
def dump(o)
|
|
o.to_source
|
|
end
|
|
|
|
def load(o)
|
|
eval(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
class ClXmlSerialContainer
|
|
attr_accessor :var
|
|
end
|
|
|
|
def clxmlserial
|
|
require 'cl/xmlserial'
|
|
ClXmlSerialContainer.instance_eval { include XmlSerialization }
|
|
class << self
|
|
def dump(o)
|
|
c = ClXmlSerialContainer.new
|
|
c.var = o
|
|
c.to_xml
|
|
end
|
|
|
|
def load(o)
|
|
ClXmlSerialContainer.from_xml(o).var
|
|
end
|
|
end
|
|
end
|
|
|
|
def soap4r
|
|
require 'soap/marshal'
|
|
class << self
|
|
def dump(o)
|
|
SOAP::Marshal.dump(o)
|
|
end
|
|
|
|
def load(o)
|
|
SOAP::Marshal.load(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def xmarshal
|
|
require 'xmarshal'
|
|
class << self
|
|
def dump(o)
|
|
XMarshal.dump(o)
|
|
end
|
|
|
|
def load(o)
|
|
XMarshal.load(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def xmlrpc
|
|
require 'xmlrpc/marshal'
|
|
class << self
|
|
def dump(o)
|
|
XMLRPC::Marshal.dump(o)
|
|
end
|
|
|
|
def load(o)
|
|
XMLRPC::Marshal.load(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def tmarshal
|
|
require 'tmarshal'
|
|
class << self
|
|
def dump(o)
|
|
TMarshal.dump(o)
|
|
end
|
|
|
|
def load(o)
|
|
TMarshal.restore(o)
|
|
end
|
|
end
|
|
end
|
|
|
|
def yaml
|
|
require 'yaml'
|
|
class << self
|
|
def dump(o)
|
|
o.to_yaml
|
|
end
|
|
|
|
def load(o)
|
|
YAML.load(o)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|