Class: CsvBlueprints::Plan::CustomizedRow

Inherits:
StandardRow
  • Object
show all
Defined in:
lib/csv_blueprints/plan.rb

Instance Method Summary collapse

Constructor Details

#initialize(overrides) ⇒ CustomizedRow

Returns a new instance of CustomizedRow.



10
11
12
# File 'lib/csv_blueprints/plan.rb', line 10

def initialize(overrides)
  @overrides = overrides
end

Instance Method Details

#values_for(index, blueprint) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/csv_blueprints/plan.rb', line 14

def values_for(index, blueprint)
  values = super

  @overrides.each_pair do |column, value|
    if values.key?(column)
      values[column] = value
    end
  end

  values
end