Class: DataMigrater::Collection
- Inherits:
-
Object
- Object
- DataMigrater::Collection
- Defined in:
- lib/data_migrater/collection.rb
Instance Method Summary collapse
-
#initialize(path = "#{Rails.root}/db/data_migrate") ⇒ Collection
constructor
A new instance of Collection.
- #migrations ⇒ Object
Constructor Details
#initialize(path = "#{Rails.root}/db/data_migrate") ⇒ Collection
Returns a new instance of Collection.
5 6 7 |
# File 'lib/data_migrater/collection.rb', line 5 def initialize(path = "#{Rails.root}/db/data_migrate") @path = path end |
Instance Method Details
#migrations ⇒ Object
9 10 11 12 13 |
# File 'lib/data_migrater/collection.rb', line 9 def migrations Dir.entries(@path).sort.map do |migration_file| migration_for migration_file end.compact end |