Module: Csvbuilder::Export::DynamicColumns
- Extended by:
- ActiveSupport::Concern
- Includes:
- DynamicColumnsBase
- Included in:
- Csvbuilder::Export
- Defined in:
- lib/csvbuilder/dynamic/columns/exporter/concerns/export/dynamic_columns.rb
Instance Method Summary collapse
- #dynamic_column_attribute_objects ⇒ Object
-
#to_row ⇒ Array
An array of public_send(column_name) of the CSV model.
Instance Method Details
#dynamic_column_attribute_objects ⇒ Object
17 18 19 20 21 |
# File 'lib/csvbuilder/dynamic/columns/exporter/concerns/export/dynamic_columns.rb', line 17 def dynamic_column_attribute_objects @dynamic_column_attribute_objects ||= array_to_block_hash(self.class.dynamic_column_names) do |column_name| self.class.dynamic_attribute_class.new(column_name, self) end end |
#to_row ⇒ Array
Returns an array of public_send(column_name) of the CSV model.
24 25 26 |
# File 'lib/csvbuilder/dynamic/columns/exporter/concerns/export/dynamic_columns.rb', line 24 def to_row super.flatten end |