Module: ActiveMigration::Transformer
- Included in:
- GroupedFieldFixedSpelling
- Defined in:
- lib/active_migration/migration.rb,
lib/active_migration/transformer/grouped_field_fixed_spelling.rb
Overview
Module Data Transformation When passing schema file or struct, the data between datasources needs a transformations
Defined Under Namespace
Classes: GroupedFieldFixedSpelling
Instance Method Summary collapse
- #after_row_saved(row, object) ⇒ Object
-
#begin(schema_from, schema_to) ⇒ Object
called on start of migration.
-
#begin_transaction(schema_from, schema_to) ⇒ Object
called on start of transaction.
-
#end(schema_from, schema_to) ⇒ Object
called on ending migration.
-
#end_transaction(schema_from, schema_to) ⇒ Object
called on ending transaction.
-
#transform(row) ⇒ Object
transform from data row to destinate data row.
- #transform_ignore_fields(row) ⇒ Object
Instance Method Details
#after_row_saved(row, object) ⇒ Object
58 59 60 |
# File 'lib/active_migration/migration.rb', line 58 def after_row_saved(row, object) # end |
#begin(schema_from, schema_to) ⇒ Object
called on start of migration
27 28 29 |
# File 'lib/active_migration/migration.rb', line 27 def begin(schema_from, schema_to) # nothing end |
#begin_transaction(schema_from, schema_to) ⇒ Object
called on start of transaction
33 34 35 |
# File 'lib/active_migration/migration.rb', line 33 def begin_transaction(schema_from, schema_to) # nothing end |
#end(schema_from, schema_to) ⇒ Object
called on ending migration
46 47 48 |
# File 'lib/active_migration/migration.rb', line 46 def end(schema_from, schema_to) # nothing end |
#end_transaction(schema_from, schema_to) ⇒ Object
called on ending transaction
52 53 54 |
# File 'lib/active_migration/migration.rb', line 52 def end_transaction(schema_from, schema_to) # nothing end |
#transform(row) ⇒ Object
transform from data row to destinate data row
40 41 42 |
# File 'lib/active_migration/migration.rb', line 40 def transform(row) raise "Implements transform method!" end |
#transform_ignore_fields(row) ⇒ Object
62 63 64 65 |
# File 'lib/active_migration/migration.rb', line 62 def transform_ignore_fields(row) #delete ignore row.reject! { |key,value| key.to_s.start_with?("ignore") } end |