Class: WikiOnThisDay::Scraper

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

Direct Known Subclasses

Article, Homepage

Defined Under Namespace

Classes: Article, Homepage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page_url) ⇒ Scraper

Returns a new instance of Scraper.



5
6
7
# File 'lib/wiki_on_this_day/scraper.rb', line 5

def initialize(page_url)
  @html_doc = Nokogiri::HTML(open(page_url))
end

Instance Attribute Details

#html_docObject (readonly)

Returns the value of attribute html_doc.



3
4
5
# File 'lib/wiki_on_this_day/scraper.rb', line 3

def html_doc
  @html_doc
end