Module: Excelsieur::Mapping::ClassMethods

Defined in:
lib/excelsieur/mapping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



10
11
12
# File 'lib/excelsieur/mapping.rb', line 10

def fields
  @fields
end

Instance Method Details

#map(header, options = {}) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/excelsieur/mapping.rb', line 12

def map(header, options = {})
  @fields ||= []
  @fields << {
    attribute: options.fetch(:to),
    header: header
  }
end