Class: Owa::Requests::Weather
- Inherits:
-
Object
- Object
- Owa::Requests::Weather
- Defined in:
- lib/owa/requests/weather.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options, parser: Parser.new, http_client: HttpClient.new) ⇒ Weather
constructor
A new instance of Weather.
Constructor Details
#initialize(options, parser: Parser.new, http_client: HttpClient.new) ⇒ Weather
Returns a new instance of Weather.
4 5 6 7 8 |
# File 'lib/owa/requests/weather.rb', line 4 def initialize(, parser: Parser.new, http_client: HttpClient.new) @parser = parser @http_client = http_client @options = .call end |
Instance Method Details
#call ⇒ Object
10 11 12 13 |
# File 'lib/owa/requests/weather.rb', line 10 def call response = @http_client.get("weather/", @options) @parser.call(response) end |