Class: LatestMigration::Base
- Inherits:
-
Object
- Object
- LatestMigration::Base
- Defined in:
- lib/latest_migration/base.rb
Class Attribute Summary collapse
Class Method Summary collapse
Class Attribute Details
.editor ⇒ Object
15 16 17 |
# File 'lib/latest_migration/base.rb', line 15 def editor @editor ||= :subl end |
Class Method Details
.latest_migration_path ⇒ Object
11 12 13 |
# File 'lib/latest_migration/base.rb', line 11 def latest_migration_path migrations_filenames.sort.last or fail LatestMigration::Errors::MigrationsNotFoundError end |
.open_latest_migration ⇒ Object
4 5 6 7 8 9 |
# File 'lib/latest_migration/base.rb', line 4 def open_latest_migration puts "Opening #{latest_migration_filename}" system editor_command rescue LatestMigration::Errors::MigrationsNotFoundError puts "Could not find any migration in this Rails application" end |