class Radar::App::Tasks::Console

Public Instance Methods

start_console() click to toggle source
# File lib/radar/app/tasks/console.rb, line 10
def start_console
  Radar::App::Bootstrap.startup
  if Object.const_defined?('Pry')
    Pry.start(nil, commands: pry_commands)
  else
    IRB.start
  end
end

Protected Instance Methods

pry_commands() click to toggle source
# File lib/radar/app/tasks/console.rb, line 21
def pry_commands
  Pry::CommandSet.new do
    command 'reload!', 'Reload the app classes' do
      puts 'Reloading...'
      $class_reloader.execute_if_updated
    end
  end
end