Class: GhostAdapter::Command
- Inherits:
-
Object
- Object
- GhostAdapter::Command
- Defined in:
- lib/ghost_adapter/command.rb
Instance Method Summary collapse
-
#initialize(alter:, table:, database: nil, dry_run: false) ⇒ Command
constructor
A new instance of Command.
- #to_a ⇒ Object
Constructor Details
#initialize(alter:, table:, database: nil, dry_run: false) ⇒ Command
Returns a new instance of Command.
5 6 7 8 9 10 11 |
# File 'lib/ghost_adapter/command.rb', line 5 def initialize(alter:, table:, database: nil, dry_run: false) @alter = alter @table = table @database = GhostAdapter.config.database || database @dry_run = dry_run validate_args_and_config! end |
Instance Method Details
#to_a ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/ghost_adapter/command.rb', line 13 def to_a [ EXECUTABLE, *base_args, *config_args, *execute_arg ] end |