class Roadfood::CLI

Public Instance Methods

call() click to toggle source
# File lib/roadfood/cli.rb, line 3
def call
  Roadfood::Scraper.new.make_reviews
  # binding.pry
  puts ""
  puts "Welcome to the latest reviews from Roadfood.com."
  start
end
print_list() click to toggle source
print_review(review) click to toggle source
start() click to toggle source
# File lib/roadfood/cli.rb, line 11
def start
  puts ""
  print_list
  puts""

  puts "What review would you like to see?"
  input = gets.strip

  review = Roadfood::Review.find(input.to_i)

  print_review(review)

  puts ""
  puts "Would you like to see another review? (y/n)"
  input = gets.strip.downcase
  if input == "y"
    puts ""
    start
  else
    puts "Ok, have a nice day!"
    exit
  end
end