Class: Dionysus::Consumer::SyncedData::AssignColumnsFromSyncedData
- Inherits:
-
Object
- Object
- Dionysus::Consumer::SyncedData::AssignColumnsFromSyncedData
- Defined in:
- lib/dionysus/consumer/synced_data/assign_columns_from_synced_data.rb
Instance Method Summary collapse
- #call(collection, columns) ⇒ Object
-
#initialize(config: Dionysus::Consumer.configuration) ⇒ AssignColumnsFromSyncedData
constructor
A new instance of AssignColumnsFromSyncedData.
Constructor Details
#initialize(config: Dionysus::Consumer.configuration) ⇒ AssignColumnsFromSyncedData
Returns a new instance of AssignColumnsFromSyncedData.
7 8 9 |
# File 'lib/dionysus/consumer/synced_data/assign_columns_from_synced_data.rb', line 7 def initialize(config: Dionysus::Consumer.configuration) @config = config end |
Instance Method Details
#call(collection, columns) ⇒ Object
11 12 13 |
# File 'lib/dionysus/consumer/synced_data/assign_columns_from_synced_data.rb', line 11 def call(collection, columns) collection.each { |record| record.update!(hash_of_attributes(record, columns)) } end |