Class: Dip::CLI::Console

Inherits:
Base
  • Object
show all
Defined in:
lib/dip/cli/console.rb

Constant Summary collapse

SHELL_OPTION =
[
  :shell,
  {aliases: "-s", type: :string, enum: %w[bash zsh fish posix],
   desc: "Target shell dialect (autodetected from $SHELL by default)"}
].freeze

Instance Method Summary collapse

Methods inherited from Base

exit_on_failure?

Instance Method Details

#inject ⇒ Object



34
35
36
37
38
39
40
# File 'lib/dip/cli/console.rb', line 34

def inject
  if options[:help]
    invoke :help, ["inject"]
  else
    Dip::Commands::Console::Inject.new(shell: options[:shell]).execute
  end
end

#start ⇒ Object



20
21
22
23
24
25
26
# File 'lib/dip/cli/console.rb', line 20

def start
  if options[:help]
    invoke :help, ["start"]
  else
    Dip::Commands::Console::Start.new(shell: options[:shell]).execute
  end
end