Method: WhatAWorld::Scraper::ScraperIssues#initialize

Defined in:
lib/what_a_world/scraper.rb

#initialize(url_extension) ⇒ ScraperIssues

Returns a new instance of ScraperIssues.



68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/what_a_world/scraper.rb', line 68

def initialize(url_extension)
    @disputes_content = []
    @refugees_content = []
    @trafficking_content = []
    @drugs_content = []
    @trafficking_hash = {}
    @disputes_hash = {}
    @drugs_hash = {}
    @refugees_hash = {}
    country_url = URL + modify_extension(url_extension)
    html = open(country_url)
    @country_page = Nokogiri::HTML(html)
end