Module: Configure

Defined in:
lib/nehm/configure.rb

Overview

Configure module responds to ‘nehm configure’ command

Class Method Summary collapse

Class Method Details



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/nehm/configure.rb', line 3

def self.menu
  loop do
    puts 'Download path: ' + Paint[PathControl.dl_path, :magenta] if PathControl.dl_path
    puts 'iTunes path: ' + Paint[PathControl.itunes_path_name, :magenta] if PathControl.itunes_path
    puts 'Permalink: ' + Paint[Config[:permalink], :cyan] if Config[:permalink]
    puts "\n"

    HighLine.new.choose do |menu|
      menu.prompt = Paint['Choose setting', :yellow]

      menu.choice('Edit download path') { PathControl.set_dl_path }
      menu.choice('Edit itunes path') { PathControl.set_itunes_path } unless OS.linux?
      menu.choice('Edit permalink') { UserControl. }
      menu.choice('Exit') { exit }
    end
    sleep(1)
    puts "\n"
  end
end