Class: Stealth::Commands::Console
- Defined in:
- lib/stealth/commands/console.rb
Overview
REPL that supports different engines.
It is run with:
`bundle exec stealth console`
Defined Under Namespace
Modules: CodeReloading
Constant Summary collapse
- ENGINES =
Supported engines
{ 'pry' => 'Pry', 'ripl' => 'Ripl', 'irb' => 'IRB' }.freeze
- DEFAULT_ENGINE =
['irb'].freeze
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #engine ⇒ Object
-
#initialize(options) ⇒ Console
constructor
A new instance of Console.
- #start ⇒ Object
Constructor Details
#initialize(options) ⇒ Console
Returns a new instance of Console.
32 33 34 35 36 |
# File 'lib/stealth/commands/console.rb', line 32 def initialize() super() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
30 31 32 |
# File 'lib/stealth/commands/console.rb', line 30 def @options end |
Instance Method Details
#engine ⇒ Object
43 44 45 |
# File 'lib/stealth/commands/console.rb', line 43 def engine load_engine .fetch(:engine) { engine_lookup } end |
#start ⇒ Object
38 39 40 41 |
# File 'lib/stealth/commands/console.rb', line 38 def start prepare engine.start end |