Class: Ronin::UI::CLI::Commands::Console

Inherits:
Ronin::UI::CLI::Command show all
Defined in:
lib/ronin/ui/cli/commands/console.rb

Overview

The ronin console command.

Instance Method Summary collapse

Methods inherited from Ronin::UI::CLI::Command

banner, command_name, #indent, inherited, #initialize, #print_array, #print_exception, #print_hash, #print_section, #print_title, #puts, run, #setup

Constructor Details

This class inherits a constructor from Ronin::UI::CLI::Command

Instance Method Details

#executeObject

Starts the Ronin Console.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/ronin/ui/cli/commands/console.rb', line 48

def execute
  if options.version?
    puts "ronin #{Ronin::VERSION}"
    return
  end

  UI::Console.color = !(options.color?)
  UI::Console.short_errors = !(options.backtrace?)

  options[:require].each do |path|
    UI::Console.auto_load << path
  end

  if options[:database]
    Database.repositories[:default] = options[:database]
  end

  UI::Console.start
end