Method: Datamappify::Data::Mapper#map_custom_attribute

Defined in:
lib/datamappify/data/mapper.rb

#map_custom_attribute(name, options) ⇒ Attribute (private)

Parameters:

  • name (Symbol)

    name of the attribute

  • options (Hash)

Returns:



102
103
104
105
106
107
108
109
# File 'lib/datamappify/data/mapper.rb', line 102

def map_custom_attribute(name, options)
  @custom_attribute_names << name

  options.reverse_merge!(:provider => default_provider_name)
  options.merge!(:primary_source_class => default_source_class)

  Attribute.new(name, options)
end