Class: CraigslistPriceItRight::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/craigslist_price_it_right.rb

Instance Method Summary collapse

Instance Method Details

#callObject



14
15
16
17
18
19
# File 'lib/craigslist_price_it_right.rb', line 14

def call
  main_menu
  url = gets.chomp.downcase
  url == "" ? url = "https://seattle.craigslist.org" : url
  PriceManager.new(url).call
end


4
5
6
7
8
9
10
11
12
# File 'lib/craigslist_price_it_right.rb', line 4

def main_menu
  puts "----------------------------------------------"
  puts "       !Welcome to Price it Right!"
  puts "     A Friendly Price Scraper for CL"
  puts "  To Begin, Let's Set the Default Page."
  puts "Please copy and paste the main CraigsList URL"
  puts "  (e.g. https://seattle.craigslist.org)"
  puts "----------------------------------------------"
end