Module: SavonHelper

Defined in:
lib/savon_helper/type_mappings.rb,
lib/savon_helper/dsl.rb,
lib/savon_helper/caching_object.rb,
lib/savon_helper/mapping_object.rb,
lib/savon_helper/soap_exception.rb,
lib/savon_helper/soap_interface.rb,
lib/savon_helper/missing_type_mapping_exception.rb

Overview

Author:

Defined Under Namespace

Modules: DSL Classes: ArrayMapping, BooleanMapping, CachingObject, DatetimeMapping, EnumMapping, FloatMapping, HintMapping, IPAddressMapping, IntegerMapping, MappingObject, MissingMapping, MissingTypeMappingException, ObjectMapping, SOAPException, SOAPInterface, StringMapping, TypeMapping

Class Method Summary collapse

Class Method Details

.define_missing_type_mapping(klass, ivar_name, value, mappings, interface) ⇒ Object

TODO:

Check if mappings can be derived from klass

Define a MissingMapping for the given options

Parameters:

  • klass (Class)

    The class to define the mapping for.

  • ivar_name (Symbol)

    The name of the ivar/accessor to hold/access the value

  • value (Object)

    The value to set the ivar to.

  • mappings (Hash{Symbol=>TypeMapping})

    The mappings hash to add the HintMapping to.



490
491
492
493
494
# File 'lib/savon_helper/type_mappings.rb', line 490

def self.define_missing_type_mapping(klass, ivar_name, value, mappings, interface)
  message = "No type mapping for #{klass}@#{ivar_name} = #{value}!"
  interface.logger.warn(message)
  mappings[ivar_name] = MissingMapping.new(message)
end