Class: Lotus::Commands::Console
- Inherits:
-
Object
- Object
- Lotus::Commands::Console
- Defined in:
- lib/lotus/commands/console.rb
Overview
Defined Under Namespace
Modules: Methods
Constant Summary collapse
- ENGINES =
{ 'pry' => 'Pry', 'ripl' => 'Ripl', 'irb' => 'IRB' }.freeze
Instance Attribute Summary collapse
- #options ⇒ Object readonly
Instance Method Summary collapse
- #engine ⇒ Object
-
#initialize(environment) ⇒ Console
constructor
A new instance of Console.
- #start ⇒ Object
Constructor Details
#initialize(environment) ⇒ Console
Returns a new instance of Console.
19 20 21 22 |
# File 'lib/lotus/commands/console.rb', line 19 def initialize(environment) @environment = environment @options = environment. end |
Instance Attribute Details
#options ⇒ Object (readonly)
17 18 19 |
# File 'lib/lotus/commands/console.rb', line 17 def @options end |
Instance Method Details
#engine ⇒ Object
36 37 38 |
# File 'lib/lotus/commands/console.rb', line 36 def engine load_engine .fetch(:engine) { engine_lookup } end |
#start ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/lotus/commands/console.rb', line 24 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 |