method

from_obj

Importance_0
v1_8_6_287 - Show latest stable - 0 notes - Class: SOAP::SOAPElement
from_obj(obj, namespace = nil) public

No documentation

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

Hide source
# File lib/soap/baseData.rb, line 615
  def self.from_obj(obj, namespace = nil)
    o = SOAPElement.new(nil)
    case obj
    when nil
      o.text = nil
    when Hash
      obj.each do |elename, value|
        if value.is_a?(Array)
          value.each do |subvalue|
            child = from_obj(subvalue, namespace)
            child.elename = to_elename(elename, namespace)
            o.add(child)
          end
        else
          child = from_obj(value, namespace)
          child.elename = to_elename(elename, namespace)
          o.add(child)
        end
      end
    else
      o.text = obj.to_s
    end
    o
  end
Register or log in to add new notes.