Class: Kamal::Cli::Base

Inherits:
Thor
  • Object
show all
Includes:
SSHKit::DSL
Defined in:
lib/kamal/cli/base.rb

Direct Known Subclasses

Accessory, App, Build, Lock, Main, Proxy, Prune, Registry, Secrets, Server

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = [], local_options = {}, config = {}) ⇒ Base

Returns a new instance of Base.



25
26
27
28
29
30
31
32
33
34
# File 'lib/kamal/cli/base.rb', line 25

def initialize(args = [], local_options = {}, config = {})
  if config[:current_command].is_a?(Kamal::Cli::Alias::Command)
    # When Thor generates a dynamic command, it doesn't attempt to parse the arguments.
    # For our purposes, it means the arguments are passed in args rather than local_options.
    super([], args, config)
  else
    super
  end
  initialize_commander unless KAMAL.configured?
end

Class Method Details

.dynamic_command_classObject



9
# File 'lib/kamal/cli/base.rb', line 9

def self.dynamic_command_class() Kamal::Cli::Alias::Command end

.exit_on_failure?Boolean

Returns:

  • (Boolean)


8
# File 'lib/kamal/cli/base.rb', line 8

def self.exit_on_failure?() false end