class Kafo::Wizard

Constants

NO
OK

Public Class Methods

new(kafo) click to toggle source
# File lib/kafo/wizard.rb, line 14
def initialize(kafo)
  @kafo   = kafo
  @config = kafo.config
  @name   = @config.app[:name] || 'Kafo'
  setup_terminal
end
utf_support?() click to toggle source
# File lib/kafo/wizard.rb, line 7
def self.utf_support?
  Kafo::ENV::LANG =~ /UTF-8\z/
end

Public Instance Methods

run() click to toggle source
# File lib/kafo/wizard.rb, line 21
    def run
      message = "Welcome to the #{@name} installer!"
      say(HighLine.color(message, :headline))
      say(HighLine.color('-' * message.size, :horizontal_line))
      say("
This wizard will gather all required information. You can change any parameter to your needs.

")

      exit 0 unless agree("\n<%= color('Ready to start?', :question) %> (y/n)", false)

      main_menu
    rescue Interrupt
      puts "Got interrupt, exiting"
      KafoConfigure.exit(0)
    end