Class: SOAP::Mapping::Factory
Direct Known Subclasses
ArrayFactory_, AttachmentFactory, Base64Factory_, BasetypeFactory_, DateTimeFactory_, FixnumFactory_, HashFactory_, RubytypeFactory, StringFactory_, TypedArrayFactory_, TypedStructFactory_, URIFactory_
Instance Method Summary
collapse
-
#initialize ⇒ Factory
constructor
A new instance of Factory.
-
#obj2soap(soap_class, obj, info, map) ⇒ Object
-
#setiv2obj(obj, node, map) ⇒ Object
-
#setiv2soap(node, obj, map) ⇒ Object
-
#soap2obj(obj_class, node, info, map) ⇒ Object
#mark_marshalled_obj, #mark_unmarshalled_obj
Constructor Details
Returns a new instance of Factory.
17
18
19
|
# File 'lib/soap/mapping/factory.rb', line 17
def initialize
end
|
Instance Method Details
#obj2soap(soap_class, obj, info, map) ⇒ Object
21
22
23
24
|
# File 'lib/soap/mapping/factory.rb', line 21
def obj2soap(soap_class, obj, info, map)
raise NotImplementError.new
end
|
#setiv2obj(obj, node, map) ⇒ Object
31
32
33
34
35
36
37
38
|
# File 'lib/soap/mapping/factory.rb', line 31
def setiv2obj(obj, node, map)
return if node.nil?
if obj.is_a?(Array)
setiv2ary(obj, node, map)
else
setiv2struct(obj, node, map)
end
end
|
#setiv2soap(node, obj, map) ⇒ Object
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/soap/mapping/factory.rb', line 40
def setiv2soap(node, obj, map)
if obj.class.class_variables.include?('@@schema_element')
setdefinediv2soap(node, obj, map)
else
obj.instance_variables.each do |var|
name = var.to_s.sub(/^@/, '')
elename = Mapping.name2elename(name)
node.add(elename,
Mapping._obj2soap(obj.instance_variable_get(var), map))
end
end
end
|
#soap2obj(obj_class, node, info, map) ⇒ Object
26
27
28
29
|
# File 'lib/soap/mapping/factory.rb', line 26
def soap2obj(obj_class, node, info, map)
raise NotImplementError.new
end
|