Class: WikiOnThisDay::Scraper

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

Direct Known Subclasses

Homepage

Defined Under Namespace

Classes: Homepage

Instance Attribute Summary collapse

Instance Method Summary collapse

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_docObject (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