Class: ConfigMapper::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/config_mapper/mapper.rb

Overview

Something that accepts configuration.

Direct Known Subclasses

DictMapper, ObjectMapper

Instance Method Summary collapse

Instance Method Details

#configure_with(data) ⇒ Hash

Map configuration data onto the target.

Returns:

  • (Hash)

    exceptions encountered



11
12
13
14
15
16
17
# File 'lib/config_mapper/mapper.rb', line 11

def configure_with(data)
  errors = {}
  data.each do |key, value|
    configure_attribute(key, value, errors)
  end
  errors
end