Class: Grubby::PageScraper

Inherits:
Scraper
  • Object
show all
Defined in:
lib/grubby/page_scraper.rb

Instance Attribute Summary collapse

Attributes inherited from Scraper

#source

Instance Method Summary collapse

Methods inherited from Scraper

#[], fields, scrapes, #to_h

Constructor Details

#initialize(source) ⇒ PageScraper

Returns a new instance of PageScraper.

Parameters:



8
9
10
11
# File 'lib/grubby/page_scraper.rb', line 8

def initialize(source)
  @page = source.assert_kind_of!(Mechanize::Page)
  super
end

Instance Attribute Details

#pageMechanize::Page (readonly)

Returns The Page being scraped.

Returns:



5
6
7
# File 'lib/grubby/page_scraper.rb', line 5

def page
  @page
end