lib/scrapper.rb
# this fuction convert all the cars in all the pages into a data structure
this fuction convert all the cars in all the pages into a data structure
this fuction convert all the cars in all the pages into a data structure
def build_full_cars(number_of_pages)
    a = [*2..number_of_pages]
    all_page_urls = get_all_page_urls(a)
    all_page_urls.map do |url|
      pu = parse_url(url)
      cars = pu.css('div.searchResults')
      create_car_hash(cars)
    end
  end
def build_full_cars ( number_of_pages ) a = [ * 2 .. number_of_pages ] all_page_urls = get_all_page_urls ( a ) all_page_urls . map do | url | pu = parse_url ( url ) cars = pu . css ( 'div.searchResults' ) create_car_hash ( cars ) end end
this fuction convert all the cars in all the pages into a data structure
this fuction convert all the cars in all the pages into a data structure
number_of_pages
<not_specific>