Method: Grubby::PageScraper.scrape_file
- Defined in:
- lib/grubby/page_scraper.rb
.scrape_file(path, agent = $grubby) ⇒ Grubby::PageScraper
Scrapes a locally-stored file. This method is intended for use with subclasses of Grubby::PageScraper
.
31 32 33 |
# File 'lib/grubby/page_scraper.rb', line 31 def self.scrape_file(path, agent = $grubby) self.new(Mechanize::Page.read_local(path).tap{|page| page.mech = agent }) end |