Class: Isomorfeus::Console
- Inherits:
-
Object
- Object
- Isomorfeus::Console
- Defined in:
- lib/isomorfeus/console.rb
Instance Method Summary collapse
-
#initialize ⇒ Console
constructor
A new instance of Console.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Console
Returns a new instance of Console.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/isomorfeus/console.rb', line 9 def initialize config_ru = File.read('config.ru') config_ru.each_line do |line| if line.start_with?('require_relative') file = line[17..-1].rstrip.tr('"','').tr("'",'') file = file + '.rb' unless file.end_with?('.rb') require File.join(Dir.pwd, file) end end Isomorfeus.zeitwerk.enable_reloading Isomorfeus.zeitwerk.setup Isomorfeus.zeitwerk.eager_load end |
Instance Method Details
#run ⇒ Object
23 24 25 26 |
# File 'lib/isomorfeus/console.rb', line 23 def run $ARGV.shift IRB.start(Isomorfeus.root) end |