Class: WikiOnThisDay::Scraper
- Inherits:
-
Object
- Object
- WikiOnThisDay::Scraper
- Defined in:
- lib/wiki_on_this_day/scraper.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Homepage
Instance Attribute Summary collapse
-
#html_doc ⇒ Object
readonly
Returns the value of attribute html_doc.
Instance Method Summary collapse
-
#initialize(page_url) ⇒ Scraper
constructor
A new instance of Scraper.
Constructor Details
#initialize(page_url) ⇒ Scraper
Returns a new instance of Scraper.
4 5 6 |
# File 'lib/wiki_on_this_day/scraper.rb', line 4 def initialize(page_url) @html_doc = Nokogiri::HTML(open(page_url)) end |
Instance Attribute Details
#html_doc ⇒ Object (readonly)
Returns the value of attribute html_doc.
2 3 4 |
# File 'lib/wiki_on_this_day/scraper.rb', line 2 def html_doc @html_doc end |