Module: Spior::Menu

Defined in:
lib/spior/menu.rb

Overview

Build an interactive menu for spior

Class Method Summary collapse

Class Method Details

.runObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/spior/menu.rb', line 6

def self.run
  loop do
    Msg.head
    puts 'Please select an option:

  1. Redirect traffic through Tor
  2. Reload Spior and change your IP
  3. Stop Tor and use a clearnet navigation
  4. Check info on your current IP
  5. Install all the dependencies
  6. Quit'

    puts
    print '>> '
    case gets.chomp
    when '1'
      Service.start
    when '2'
      Service.restart
    when '3'
      Service.stop
    when '4'
      Status.info
    when '5'
      Dep.looking
    else
      exit
    end
  end
end