Parent

Class/Module Index [+]

Quicksearch

Weatherman::Client

Client

The weatherman client. Where it all begins.

Attributes

options[R]

Public Class Methods

new(options = {}) click to toggle source

Accepts a optional hash containing the client options.

Options:

+unit+: the unit used for the temperature (defaults to Celsius).
"f" => Fahrenheight
"c" => Celsius

+lang+: the language used in the response
# File lib/yahoo_weatherman.rb, line 38
def initialize(options = {})
  @options = options
  @uri = options[:url] || URI
end

Public Instance Methods

lookup_by_woeid(woeid) click to toggle source

Just pass in a woeid and it will return a Weatherman::Response object:w

# File lib/yahoo_weatherman.rb, line 46
def lookup_by_woeid(woeid)
  raw = get request_url(woeid)
  Response.new(raw, options[:lang])
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.