Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#detailsObject

puts “Select from the list below to see more information” details end



53
54
55
# File 'lib/LaptopHunt/LaptopHunt.rb', line 53

def details
  puts "#{laptop.model}-----#{laptop.cost}"
end

#moreObject



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/LaptopHunt/LaptopHunt.rb', line 57

def more
  puts "Would you like to see more laptops (Y/N)?"
  answer = gets.chomp

  loop do
    if answer.include?("Y") || answer.include?("y")
      search
      break
    elsif answer.include?("N") || answer.include?("n")
      puts "Thank you and have a nice day!"
      break
    else
      puts "Please select Y or N"
      answer = gets.chomp
    end
  end
end