method

setiv2soap

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::Mapping::Factory
setiv2soap(node, obj, map) public

No documentation

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

Hide source
# File lib/soap/mapping/factory.rb, line 39
  def setiv2soap(node, obj, map)
    if obj.class.class_variables.include?('@@schema_element')
      obj.class.class_eval('@@schema_element').each do |name, info|
        type, qname = info
        if qname
          elename = qname.name
        else
          elename = Mapping.name2elename(name)
        end
        node.add(elename,
          Mapping._obj2soap(obj.instance_variable_get('@' + name), map))
      end
    else
      # should we sort instance_variables?
      obj.instance_variables.each do |var|
        name = var.sub(/^@/, '')
        elename = Mapping.name2elename(name)
        node.add(elename,
          Mapping._obj2soap(obj.instance_variable_get(var), map))
      end
    end
  end
Register or log in to add new notes.