Class: Karafka::Cli::Console
Overview
Console Karafka Cli action
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.console ⇒ String
Console executing command for non-Rails setup.
-
.rails_console ⇒ String
Console executing command for Rails setup.
Instance Method Summary collapse
-
#call ⇒ Object
Start the Karafka console.
Methods inherited from Base
aliases, commands, desc, #initialize, load, name, names, option, parse_options
Methods included from Helpers::Colorize
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Class Method Details
.console ⇒ String
Returns Console executing command for non-Rails setup.
16 17 18 |
# File 'lib/karafka/cli/console.rb', line 16 def console "IRBRC='#{Karafka.gem_root}/.console_irbrc' bundle exec irb -r #{Karafka.boot_file}" end |
.rails_console ⇒ String
Note:
In case of Rails, it has its own console, hence we can just defer to it
Returns Console executing command for Rails setup.
22 23 24 |
# File 'lib/karafka/cli/console.rb', line 22 def rails_console 'bundle exec rails console' end |