Class: SimpleOpenWeatherMap::HttpConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_open_weather_map/http_connection.rb

Instance Method Summary collapse

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