Sha256: df9664865707e1d9c3c630674c82ed84afd59fbe3ea5d44c17216647085d580a

Contents?: true

Size: 774 Bytes

Versions: 1

Compression:

Stored size: 774 Bytes

Contents

require 'readline'
require 'wlog/domain/sys_config'
require 'wlog/commands/taint_setup'
require 'wlog/tech/wlog_string'

module Wlog
# This is the ui that is displayed whenever we detect that it is the first
# time that the application runs. Use this
# __ONLY__ for system wide configuration
# @author Simon Symeonidis
class SetupWizard
  def initialize
  end

  # Call this to prompt the user for things
  def run
    get_setting
    SysConfig.store_config('ansi', @input)
    TaintSetup.new.execute
  end

private

  def get_setting
    puts WlogString.green('ABCD')
    question = "Is the previous line a green 'ABCD'? [yes/no] :"
    until ['yes', 'no'].include? input
      @input = Readline.readline(question)
      @input.chomp!
    end
  end

  attr :input

end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wlog-1.2.2 lib/wlog/ui/setup_wizard.rb