Class: Hanami::CLI::Commands::App::DB::Command Private
- Inherits:
-
Command
- Object
- Dry::CLI::Command
- Hanami::CLI::Command
- Command
- Hanami::CLI::Commands::App::DB::Command
- Defined in:
- lib/hanami/cli/commands/app/db/command.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Base class for hanami
CLI commands intended to be executed within an existing Hanami
app.
Direct Known Subclasses
Create, Drop, Migrate, Prepare, Seed, Structure::Dump, Structure::Load, Version
Constant Summary
Constants inherited from Command
Instance Attribute Summary collapse
- #system_call ⇒ Object readonly private
- #test_env_executor ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(out:, err:, system_call: SystemCall.new, test_env_executor: InteractiveSystemCall.new(out: out, err: err), nested_command: false, **opts) ⇒ Command
constructor
private
A new instance of Command.
- #nested_command? ⇒ Boolean private
- #run_command(klass) ⇒ Object private
Methods inherited from Command
Methods inherited from Hanami::CLI::Command
Constructor Details
#initialize(out:, err:, system_call: SystemCall.new, test_env_executor: InteractiveSystemCall.new(out: out, err: err), nested_command: false, **opts) ⇒ Command
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Command.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 26 def initialize( out:, err:, system_call: SystemCall.new, test_env_executor: InteractiveSystemCall.new(out: out, err: err), nested_command: false, **opts ) super(out: out, err: err, **opts) @system_call = system_call @test_env_executor = test_env_executor @nested_command = nested_command end |
Instance Attribute Details
#system_call ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 21 def system_call @system_call end |
#test_env_executor ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 24 def test_env_executor @test_env_executor end |
Instance Method Details
#nested_command? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 50 def nested_command? @nested_command end |
#run_command(klass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 39 def run_command(klass, ...) klass.new( out: out, inflector: inflector, fs: fs, system_call: system_call, test_env_executor: test_env_executor, nested_command: true, ).call(...) end |