Class: HolidayScraper::Scraper
- Inherits:
-
Object
- Object
- HolidayScraper::Scraper
- Defined in:
- lib/holiday_scraper/scraper.rb
Constant Summary collapse
- DAELLIKON_FERIENPLAN_URL =
'http://www.schule-daellikon.ch/de/ferienplan/'
Instance Method Summary collapse
-
#initialize(url = DAELLIKON_FERIENPLAN_URL) ⇒ Scraper
constructor
A new instance of Scraper.
- #page ⇒ Object
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
#page ⇒ Object
10 11 12 |
# File 'lib/holiday_scraper/scraper.rb', line 10 def page @page ||= Nokogiri::HTML(HTTParty.get(url)) end |