class Travel::CLI
Public Instance Methods
all_inclusive_resorts()
click to toggle source
# File lib/travel/cli.rb, line 72 def all_inclusive_resorts Travel::Scraper.scrape_all_inclusive_resorts.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name} - #{winner.location}" end return nil end
attractions()
click to toggle source
# File lib/travel/cli.rb, line 79 def attractions Travel::Scraper.scrape_attractions.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name} - #{winner.location}" end return nil end
beaches()
click to toggle source
# File lib/travel/cli.rb, line 86 def beaches Travel::Scraper.scrape_beaches.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name} - #{winner.location}, #{winner.best_time}" end return nil end
call()
click to toggle source
# File lib/travel/cli.rb, line 3 def call puts "Welcome to World Travelers'Awards for #{Time.now.year}" list_awards menu end
destinations()
click to toggle source
# File lib/travel/cli.rb, line 93 def destinations Travel::Scraper.scrape_destinations.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name}" end return nil end
destinations_on_the_rise()
click to toggle source
# File lib/travel/cli.rb, line 100 def destinations_on_the_rise Travel::Scraper.scrape_destinations_on_the_rise.each.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name}" end return nil end
goodbye()
click to toggle source
# File lib/travel/cli.rb, line 67 def goodbye puts "Thank you for visiting Travelers Choice Awards. Have a nice day!" exit end
hotels()
click to toggle source
# File lib/travel/cli.rb, line 107 def hotels Travel::Scraper.scrape_hotels.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name} - #{winner.location}" end return nil end
islands()
click to toggle source
# File lib/travel/cli.rb, line 115 def islands Travel::Scraper.scrape_islands.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name}" end return nil end
landmarks()
click to toggle source
# File lib/travel/cli.rb, line 122 def landmarks Travel::Scraper.scrape_landmarks.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name}- #{winner.location}" end return nil end
list_awards()
click to toggle source
# File lib/travel/cli.rb, line 10 def list_awards puts "Please select a category or type exit." @lists = Travel::List.choices_awards end
museums()
click to toggle source
# File lib/travel/cli.rb, line 129 def museums Travel::Scraper.scrape_museums.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name}- #{winner.location}" end return nil end
restaurants()
click to toggle source
# File lib/travel/cli.rb, line 136 def restaurants Travel::Scraper.scrape_restaurants.each.with_index(1) do |winner, index| puts "#{index}: #{winner.name}- #{winner.location} - #{winner.cuisine}" end return nil end