Class: LCBO::StoreListPage

Inherits:
Object
  • Object
show all
Includes:
CrawlKit::Page
Defined in:
lib/lcbo/pages/store_list_page.rb

Constant Summary collapse

STORE_COUNT_RANGE =
600..635

Instance Method Summary collapse

Methods included from CrawlKit::Page

#[], #as_hash, #fields, #http_method, included, #initialize, #is_parsed?, #parse, #process, #request, #request_prototype

Instance Method Details

#verify_number_of_storesObject



18
19
20
21
22
# File 'lib/lcbo/pages/store_list_page.rb', line 18

def verify_number_of_stores
  return if STORE_COUNT_RANGE.include?(store_ids.length)
  raise CrawlKit::MalformedError,
    "Store count (#{store_ids.length}) not in range: #{STORE_COUNT_RANGE}"
end