Class: Weatheruby
- Inherits:
-
Object
- Object
- Weatheruby
- Includes:
- Weather::Actions, Weather::Planner
- Defined in:
- lib/weatheruby.rb
Defined Under Namespace
Classes: WeatherError
Instance Attribute Summary collapse
-
#language_key ⇒ Object
Returns the value of attribute language_key.
Instance Method Summary collapse
-
#initialize(api_key, language = 'EN', use_pws = true, use_bestfct = true) ⇒ Weatheruby
constructor
Creates a new instance of Weatheruby.
Methods included from Weather::Planner
#chance_of_cloudy, #chance_of_fog, #chance_of_freezing, #chance_of_groundsnow, #chance_of_hail, #chance_of_heat, #chance_of_high_wind, #chance_of_humid, #chance_of_not_freezing, #chance_of_partlycloudy, #chance_of_precipitation, #chance_of_rain, #chance_of_snow, #chance_of_sultry, #chance_of_sunny, #chance_of_thunderstorms, #chance_of_tornado, #chance_of_warmth, #get_dewpoints, #get_precipitation, #get_temperatures
Methods included from Weather::Actions
#alerts, #complex_forecast, #complex_forecast_10day, #conditions, #hurricane_data, #moon_phase, #record_high, #record_low, #simple_forecast, #simple_forecast_10day, #sun_info
Constructor Details
#initialize(api_key, language = 'EN', use_pws = true, use_bestfct = true) ⇒ Weatheruby
Creates a new instance of Weatheruby.
33 34 35 36 37 38 39 40 |
# File 'lib/weatheruby.rb', line 33 def initialize(api_key, language = 'EN', use_pws = true, use_bestfct = true) @api_key = api_key @language_key = language.upcase @use_pws = use_pws ? 1 : 0 @use_bestfct = use_bestfct ? 1 : 0 @client = HTTPClient.new end |
Instance Attribute Details
#language_key ⇒ Object
Returns the value of attribute language_key.
26 27 28 |
# File 'lib/weatheruby.rb', line 26 def language_key @language_key end |