class OverwatchHelper::Map

Attributes

name[RW]

Public Class Methods

all() click to toggle source
# File lib/overwatch_helper/map.rb, line 3
def self.all
  # should list all the maps
  self.scrape_maps
end
scrape_maps() click to toggle source
# File lib/overwatch_helper/map.rb, line 8
def self.scrape_maps
  doc = Nokogiri::HTML(open("http://overwatch.wikia.com/wiki/Overwatch_Wiki"))
  @maps = doc.css("div#gallery-2 div.lightbox-caption").collect do |i|
    {
      :name=>i.text
    }
  end
  @maps
end