Class: MigrExt::Importer
- Inherits:
-
Object
- Object
- MigrExt::Importer
- Defined in:
- lib/migrext/importer.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
Instance Method Summary collapse
-
#initialize(application) ⇒ Importer
constructor
A new instance of Importer.
- #run! ⇒ Object
Constructor Details
#initialize(application) ⇒ Importer
5 6 7 |
# File 'lib/migrext/importer.rb', line 5 def initialize(application) @application = application end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
3 4 5 |
# File 'lib/migrext/importer.rb', line 3 def application @application end |
Instance Method Details
#run! ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/migrext/importer.rb', line 9 def run! # Find available migrations application.external_sources.map do |source| set = MigrExt::MigrationSet.new(application, source[:name], source[:path]) set.current_migrations.each do |migration| unless migration.imported? migration.create_rooted_content! end end end end |