Class: Glossarist::CLI::UpgradeCommand
- Inherits:
-
Object
- Object
- Glossarist::CLI::UpgradeCommand
- Defined in:
- lib/glossarist/cli/upgrade_command.rb
Instance Method Summary collapse
-
#initialize(source_dir, options) ⇒ UpgradeCommand
constructor
A new instance of UpgradeCommand.
- #run ⇒ Object
Constructor Details
#initialize(source_dir, options) ⇒ UpgradeCommand
Returns a new instance of UpgradeCommand.
6 7 8 9 |
# File 'lib/glossarist/cli/upgrade_command.rb', line 6 def initialize(source_dir, ) @source_dir = source_dir @options = end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/glossarist/cli/upgrade_command.rb', line 11 def run result = SchemaMigration.upgrade_directory( @source_dir, output: @options[:output], target_version: @options[:target_version], cross_references: @options[:cross_references], dry_run: @options[:dry_run], ) report(result) rescue ArgumentError => e warn "Error: #{e.}" exit 1 end |