method
obj2soap
v1_8_7_330 -
Show latest stable
-
0 notes -
Class: SOAP::Mapping::Registry::Map
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
obj2soap(obj)
public
Hide source
# File lib/soap/mapping/registry.rb, line 185 def obj2soap(obj) klass = obj.class if map = @obj2soap[klass] map.each do |soap_class, factory, info| ret = factory.obj2soap(soap_class, obj, info, @registry) return ret if ret end end ancestors = klass.ancestors ancestors.delete(klass) ancestors.delete(::Object) ancestors.delete(::Kernel) ancestors.each do |klass| if map = @obj2soap[klass] map.each do |soap_class, factory, info| if info[:derived_class] ret = factory.obj2soap(soap_class, obj, info, @registry) return ret if ret end end end end nil end