Module: CsvRowModel::DynamicColumnsBase

Extended by:
ActiveSupport::Concern
Includes:
Model::DynamicColumns
Included in:
Export::DynamicColumns, Import::DynamicColumns
Defined in:
lib/csv_row_model/concerns/dynamic_columns_base.rb

Constant Summary collapse

ATTRIBUTE_METHODS =
{
  original_attributes: :value, # a map of `column_name => original_attribute(column_name)`
  formatted_attributes: :formatted_cells, # a map of `column_name => format_cell(column_name, ...)`
}.freeze

Instance Method Summary collapse

Instance Method Details

#attribute_objectsObject


9
10
11
# File 'lib/csv_row_model/concerns/dynamic_columns_base.rb', line 9

def attribute_objects
  @attribute_objects ||= super.merge(dynamic_column_attribute_objects)
end

#attributesObject


13
14
15
# File 'lib/csv_row_model/concerns/dynamic_columns_base.rb', line 13

def attributes
  super.merge!(attributes_from_method_names(self.class.dynamic_column_names))
end