lib/savon_helper/mapping_object.rb
# Return the instance as a hash of simple (type-converted) values suitable for Savon.
#
# @return [Hash] A hash of simple types.
Return the instance as a hash of simple (type-converted) values suitable for Savon.
Return the instance as a hash of simple ( type - converted ) values suitable for Savon .
def to_savon
      hash = Hash.new()
      type_mappings.keys.each do |ivar_name|
        value = map_to_savon(ivar_name, instance_variable_get("@#{ivar_name}"))
        hash[ivar_name.to_sym] = value unless value.nil?
      end
      hash
    end
def to_savon hash = Hash . new ( ) type_mappings . keys . each do | ivar_name | value = map_to_savon ( ivar_name , instance_variable_get ( "@#{ivar_name}" ) ) hash [ ivar_name . to_sym ] = value unless value . nil? end hash end
Return the instance as a hash of simple (type-converted) values suitable for Savon.
Return the instance as a hash of simple ( type - converted ) values suitable for Savon .
A hash of simple types.
A hash of simple types .
Hash