Module: OW
Defined Under Namespace
Classes: Configuration, ForbiddenError, UnknownResponse, UnprocessableError, Weather
Constant Summary collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Instance Method Summary collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
8 9 10 |
# File 'lib/OW/client.rb', line 8 def configuration @configuration end |
Instance Method Details
#configure {|configuration| ... } ⇒ Object
21 22 23 24 |
# File 'lib/OW/client.rb', line 21 def configure self.configuration ||= Configuration.new yield(configuration) end |
#get_weather(options = {}) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/OW/client.rb', line 26 def get_weather(={}) check_configuration! uri = set_params() response = send_request(uri) parse_json(response) end |