Class: SOAP::Mapping::TypedStructFactory_
- Defined in:
- lib/soap/mapping/factory.rb
Instance Method Summary collapse
Methods inherited from Factory
#initialize, #setiv2obj, #setiv2soap
Methods included from TraverseSupport
#mark_marshalled_obj, #mark_unmarshalled_obj
Constructor Details
This class inherits a constructor from SOAP::Mapping::Factory
Instance Method Details
#obj2soap(soap_class, obj, info, map) ⇒ Object
278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/soap/mapping/factory.rb', line 278 def obj2soap(soap_class, obj, info, map) type = info[:type] || info[0] soap_obj = soap_class.new(type) mark_marshalled_obj(obj, soap_obj) if obj.class <= SOAP::Marshallable setiv2soap(soap_obj, obj, map) else setiv2soap(soap_obj, obj, map) end soap_obj end |
#soap2obj(obj_class, node, info, map) ⇒ Object
290 291 292 293 294 295 296 297 298 299 |
# File 'lib/soap/mapping/factory.rb', line 290 def soap2obj(obj_class, node, info, map) type = info[:type] || info[0] unless node.type == type return false end obj = Mapping.create_empty_object(obj_class) mark_unmarshalled_obj(node, obj) setiv2obj(obj, node, map) return true, obj end |