Flowdock
method

to_obj

Importance_0
v1_8_7_72 - Show latest stable - 0 notes - Class: SOAP::SOAPElement
to_obj() 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 579
  def to_obj
    if members.empty?
      @text
    else
      hash = {}
      proptype = {}
      each do |k, v|
        value = v.respond_to?(:to_obj) ? v.to_obj : v.to_s
        case proptype[k]
        when :single
          hash[k] = [hash[k], value]
          proptype[k] = :multi
        when :multi
          hash[k] << value
        else
          hash[k] = value
          proptype[k] = :single
        end
      end
      hash
    end
  end
Register or log in to add new notes.