Class: Weatherman::Client
- Inherits:
-
Object
- Object
- Weatherman::Client
- Defined in:
- lib/yahoo_weatherman.rb
Overview
Client
The weatherman client. Where it all begins.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
Accepts a optional hash containing the client options.
-
#lookup_by_city_code(city_code) ⇒ Object
Just pass in a
woeid
and it will return a Weatherman::Response object:w.
Constructor Details
#initialize(options = {}) ⇒ Client
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
39 40 41 42 |
# File 'lib/yahoo_weatherman.rb', line 39 def initialize( = {}) @options = @uri = [:url] || URI end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
26 27 28 |
# File 'lib/yahoo_weatherman.rb', line 26 def @options end |