Class: Pumi::DataSource::Wikipedia::CambodianDistrictsScraper

Inherits:
Object
  • Object
show all
Defined in:
lib/pumi/data_source/wikipedia.rb

Constant Summary collapse

URL =
"https://en.wikipedia.org/wiki/List_of_districts,_municipalities_and_sections_in_Cambodia".freeze

Instance Method Summary collapse

Instance Method Details

#scrape!Object



119
120
121
122
123
124
125
126
127
# File 'lib/pumi/data_source/wikipedia.rb', line 119

def scrape!
  District.all.each_with_object([]) do |district, result|
    result << ScraperResult.new(
      code: district.id,
      wikipedia: find_url(district),
      name_ungegn: find_ungegn(district)
    )
  end
end