Class: Hanami::CLI::Commands::App::DB::Command Private
- Inherits:
-
App::Command
- Object
- App::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
Defined Under Namespace
Modules: SkipTestDB
Instance Attribute Summary collapse
- #system_call ⇒ Object readonly private
- #test_env_executor ⇒ Object readonly private
Class Method Summary collapse
- .inherited(klass) ⇒ Object 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
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.
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 62 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.
57 58 59 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 57 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.
60 61 62 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 60 def test_env_executor @test_env_executor end |
Class Method Details
.inherited(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.
48 49 50 51 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 48 def self.inherited(klass) super klass.prepend(SkipTestDB) 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.
85 86 87 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 85 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.
75 76 77 78 79 80 81 82 83 |
# File 'lib/hanami/cli/commands/app/db/command.rb', line 75 def run_command(klass, ...) klass.new( out: out, fs: fs, system_call: system_call, test_env_executor: test_env_executor, nested_command: true ).call(...) end |