class WhatAWorld::Scraper::ScraperCountry
Attributes
country_page[RW]
region[W]
Public Class Methods
new(url_extension)
click to toggle source
# File lib/what_a_world/scraper.rb, line 46 def initialize(url_extension) country_url = URL + url_extension html = open(country_url) @country_page = Nokogiri::HTML(html) end
Public Instance Methods
find_date()
click to toggle source
# File lib/what_a_world/scraper.rb, line 52 def find_date self.country_page.css("div.lastMod").text.strip end
find_region()
click to toggle source
# File lib/what_a_world/scraper.rb, line 55 def find_region str = self.country_page.css("div.region1.geos_title").text.strip self.region = str.split(" ")[0] end