Class: FlywayMigrator::CLI
- Inherits:
-
Thor
- Object
- Thor
- FlywayMigrator::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/flyway_migrator/cli.rb
Overview
The Command Line Interface (CLI) for the gem.
Class Method Summary collapse
Instance Method Summary collapse
- #generate ⇒ Object
- #help(task = nil) ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ CLI
constructor
A new instance of CLI.
- #version ⇒ Object
Constructor Details
#initialize(args = [], options = {}, config = {}) ⇒ CLI
Returns a new instance of CLI.
18 19 20 21 22 23 |
# File 'lib/flyway_migrator/cli.rb', line 18 def initialize args = [], = {}, config = {} super args, , config @configuration = self.class.configuration rescue Runcom::Errors::Base => error abort error. end |
Class Method Details
Instance Method Details
#generate ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/flyway_migrator/cli.rb', line 31 def generate path = configuration.path if .name? FlywayMigrator::Migration.generate(.name) else help(:name) end end |
#help(task = nil) ⇒ Object
48 49 50 |
# File 'lib/flyway_migrator/cli.rb', line 48 def help task = nil say and super end |
#version ⇒ Object
42 43 44 |
# File 'lib/flyway_migrator/cli.rb', line 42 def version say Identity.version_label end |