Class: FReCon::Console

Inherits:
Object show all
Defined in:
lib/frecon/console.rb

Class Method Summary collapse

Class Method Details

.startObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/frecon/console.rb', line 15

def self.start
  Database.setup(FReCon.environment)

  # Use pry if it is installed.
  # Use the context of the FReCon module;
  # this allows for writing "Team" instead of "FReCon::Team".
  begin
    require "pry"

    FReCon.pry
  rescue LoadError
    require "irb"

    IRB.setup nil
    IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context

    require "irb/ext/multi-irb"

    IRB.irb nil, FReCon
  end
end