app/models/cli.rb
#---welcome user and gets input about previous use
welcome user and gets input about previous use
welcome user and gets input about previous use
def start
    puts ""
    puts Rainbow("*").blue * 70
    puts ""
    puts ""
    puts ""
    puts ""
    puts Rainbow("Welcome to UPTIME!").bright.underline
    puts ""
    puts "You may type \"quit\" at any time to leave UPTIME."
    puts ""
    puts "Have you used UPTIME on this computer before?"
    puts ""
    puts " 1. Yes"
    puts " 2. No"
    puts ""
    used_before = gets.strip
    self.quit if used_before == "quit"
    if used_before == "1"
      self.user_already_exists
    elsif used_before == "2"
      self.create_new_user
    else
      self.what_was_that?
      self.start
    end
  end
def start puts "" puts Rainbow ( "*" ) . blue * 70 puts "" puts "" puts "" puts "" puts Rainbow ( "Welcome to UPTIME!" ) . bright . underline puts "" puts "You may type \"quit\" at any time to leave UPTIME." puts "" puts "Have you used UPTIME on this computer before?" puts "" puts " 1. Yes" puts " 2. No" puts "" used_before = gets . strip self . quit if used_before == "quit" if used_before == "1" self . user_already_exists elsif used_before == "2" self . create_new_user else self . what_was_that? self . start end end
welcome user and gets input about previous use
welcome user and gets input about previous use