module OpenWeatherApi
Constants
- VERSION
Attributes
configuration[W]
Public Class Methods
city(city)
click to toggle source
# File lib/open_weather_api/city_methods.rb, line 2 def self.city(city) Location.new(city: city) end
city_id(city_id)
click to toggle source
# File lib/open_weather_api/city_methods.rb, line 6 def self.city_id(city_id) Location.new(city_id: city_id) end
configuration()
click to toggle source
# File lib/open_weather_api/configure.rb, line 6 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
# File lib/open_weather_api/configure.rb, line 10 def self.configure yield(configuration) end
geolocate(args)
click to toggle source
# File lib/open_weather_api/city_methods.rb, line 10 def self.geolocate(args) lat = args.respond_to?(:lat) ? args.lat : args[:lat] lng = args.respond_to?(:lng) ? args.lng : args[:lng] Location.new(lat: lat, lng: lng) end