Class: Weatherman::WoeidLookup

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo_weatherman/woeid_lookup.rb

Instance Method Summary collapse

Instance Method Details

#get_woeid(location) ⇒ Object


6
7
8
9
10
11
# File 'lib/yahoo_weatherman/woeid_lookup.rb', line 6

def get_woeid(location)
  raw = get query_string(location)
  Nokogiri::HTML(raw).at_xpath('.//woeid').content
rescue
  nil
end