method

obj2soap

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::Mapping::Registry::Map
obj2soap(obj) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

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
Register or log in to add new notes.