Method: Bundler::CLI::Console#get_console

Defined in:
lib/bundler/cli/console.rb

#get_console(name) ⇒ Object


19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/bundler/cli/console.rb', line 19

def get_console(name)
  require name
  get_constant(name)
rescue LoadError
  if name == "irb"
    Bundler.ui.error "#{name} is not available"
    exit 1
  else
    Bundler.ui.error "Couldn't load console #{name}, falling back to irb"
    name = "irb"
    retry
  end
end