Class: Metal::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/webget-football/metal.rb

Direct Known Subclasses

Fbref::Metal, Worldfootball::Metal

Class Method Summary collapse

Class Method Details

.download_page(url) ⇒ Object

todo/check: rename to get_page or such - why? why not?



12
13
14
15
16
17
# File 'lib/webget-football/metal.rb', line 12

def self.download_page( url )  ## get & record/save to cache
  response = Webget.page( url )  ## fetch (and cache) html page (via HTTP GET)

  ## note: exit on get / fetch error - do NOT continue for now - why? why not?
  exit 1   if response.status.nok?    ## e.g.  HTTP status code != 200
end