Method: WhatAWorld::Scraper::ScraperIssues#scrape_issues

Defined in:
lib/what_a_world/scraper.rb

#scrape_issuesObject



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/what_a_world/scraper.rb', line 93

def scrape_issues
    iterator = 0
    scraped_string(iterator)
    finished = false
    while !finished
        if  @@disputes == scraped_string(iterator)
            iterator = add_content(iterator, self.disputes_content)
        elsif @@refugees == scraped_string(iterator)
            iterator = add_content(iterator, self.refugees_content)
        elsif @@trafficking == scraped_string(iterator)
            iterator = add_content(iterator, self.trafficking_content)
        elsif @@drugs == scraped_string(iterator)
            iterator = add_content(iterator, self.drugs_content)
        else
            finished = true
        end 
    end
self.disputes_hash[@@disputes] = self.disputes_content
self.refugees_hash[@@refugees] = self.refugees_content
self.trafficking_hash[@@trafficking] = self.trafficking_content
self.drugs_hash[@@drugs] = self.drugs_content
end