Class: HolidayScraper::Scraper

Inherits:
Object
  • Object
show all
Defined in:
lib/holiday_scraper/scraper.rb

Constant Summary collapse

DAELLIKON_FERIENPLAN_URL =
'http://www.schule-daellikon.ch/de/ferienplan/'

Instance Method Summary collapse

Constructor Details

#initialize(url = DAELLIKON_FERIENPLAN_URL) ⇒ Scraper

Returns a new instance of Scraper.



6
7
8
# File 'lib/holiday_scraper/scraper.rb', line 6

def initialize(url = DAELLIKON_FERIENPLAN_URL)
  @url = url
end

Instance Method Details

#pageObject



10
11
12
# File 'lib/holiday_scraper/scraper.rb', line 10

def page
  @page ||= Nokogiri::HTML(HTTParty.get(url))
end