Class: SimpleOpenWeatherMap::HttpConnection
- Inherits:
-
Object
- Object
- SimpleOpenWeatherMap::HttpConnection
- Defined in:
- lib/simple_open_weather_map/http_connection.rb
Instance Method Summary collapse
- #get_contents(params = {}) ⇒ Object
-
#initialize(uri) ⇒ HttpConnection
constructor
A new instance of HttpConnection.
Constructor Details
#initialize(uri) ⇒ HttpConnection
Returns a new instance of HttpConnection.
6 7 8 |
# File 'lib/simple_open_weather_map/http_connection.rb', line 6 def initialize(uri) @uri = uri end |
Instance Method Details
#get_contents(params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/simple_open_weather_map/http_connection.rb', line 10 def get_contents(params = {}) client = ::HTTPClient.new client.get_content(url_with_params(params)) end |