Class: Hanami::CLI::Commands::App::Console Private

Inherits:
Command show all
Defined in:
lib/hanami/cli/commands/app/console.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.

Since:

  • 2.0.0

Constant Summary

Constants inherited from Command

Hanami::CLI::Commands::App::Command::ACTION_SEPARATOR

Instance Method Summary collapse

Methods inherited from Command

#app, #database, #database_config, inherited, #measure, #run_command

Methods inherited from Hanami::CLI::Command

#initialize, new

Constructor Details

This class inherits a constructor from Hanami::CLI::Command

Instance Method Details

#call(engine: nil, **opts) ⇒ 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.

Since:

  • 2.0.0



40
41
42
43
44
45
46
47
48
49
# File 'lib/hanami/cli/commands/app/console.rb', line 40

def call(engine: nil, **opts)
  console_engine = resolve_engine(engine, opts)

  if console_engine.nil?
    err.puts "`#{engine}' is not bundled. Please run `bundle add #{engine}' and retry."
    exit(1)
  end

  console_engine.start
end