Class: Lotus::Commands::Console Private
- Inherits:
-
Object
- Object
- Lotus::Commands::Console
- Defined in:
- lib/lotus/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 lotus console`
Defined Under Namespace
Modules: Methods
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.
{ '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
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.
34 35 36 37 |
# File 'lib/lotus/commands/console.rb', line 34 def initialize() @environment = Lotus::Environment.new() @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.
28 29 30 |
# File 'lib/lotus/commands/console.rb', line 28 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.
54 55 56 |
# File 'lib/lotus/commands/console.rb', line 54 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.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/lotus/commands/console.rb', line 40 def start # Clear out ARGV so Pry/IRB don't attempt to parse the rest ARGV.shift until ARGV.empty? @environment.require_application_environment # Add convenience methods to the main:Object binding TOPLEVEL_BINDING.eval('self').send(:include, Methods) load_application engine.start end |