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
bind_to, desc, #initialize, load, option
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Class Method Details
.console ⇒ String
Returns Console executing command for non-Rails setup.
15 16 17 |
# File 'lib/karafka/cli/console.rb', line 15 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.
21 22 23 |
# File 'lib/karafka/cli/console.rb', line 21 def rails_console 'bundle exec rails console' end |