Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created June 7, 2012 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havenwood/2890379 to your computer and use it in GitHub Desktop.
Save havenwood/2890379 to your computer and use it in GitHub Desktop.
D3 US Server Status from IRB/Pry
require 'nokogiri'
require 'open-uri'
module D3
def self.status
status = Nokogiri::HTML(open 'http://us.battle.net/d3/en/status')
status.search('div.status-icon').first.attributes['data-tooltip'].value
end
end
D3.status
# => "Available"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment