Class: Hanami::Commands::Console Private
- Defined in:
- lib/hanami/commands/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.
REPL that supports different engines.
It is run with:
`bundle exec hanami console`
Defined Under Namespace
Modules: CodeReloading
Constant Summary collapse
- ENGINES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Supported engines
{ 'pry' => 'Pry', 'ripl' => 'Ripl', 'irb' => 'IRB' }.freeze
- DEFAULT_ENGINE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
['irb'].freeze
Instance Attribute Summary collapse
- #options ⇒ Object readonly private
Instance Method Summary collapse
- #engine ⇒ Object private
-
#initialize(options) ⇒ Console
constructor
private
A new instance of Console.
- #start ⇒ Object private
Methods inherited from Command
Constructor Details
#initialize(options) ⇒ Console
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.
Returns a new instance of Console.
46 47 48 49 50 |
# File 'lib/hanami/commands/console.rb', line 46 def initialize() super() @options = @environment. end |
Instance Attribute Details
#options ⇒ Object (readonly)
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.
40 41 42 |
# File 'lib/hanami/commands/console.rb', line 40 def @options end |
Instance Method Details
#engine ⇒ 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.
60 61 62 |
# File 'lib/hanami/commands/console.rb', line 60 def engine load_engine .fetch(:engine) { engine_lookup } end |
#start ⇒ 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.
53 54 55 56 |
# File 'lib/hanami/commands/console.rb', line 53 def start prepare engine.start end |