Module: WeatherJudge::Configuration
- Included in:
- WeatherJudge
- Defined in:
- lib/weather_judge/configuration.rb
Instance Attribute Summary collapse
- #forecast_io_api_key ⇒ Object
-
#ideal_temp_range ⇒ Object
Ideal temperature range in fahrenheit expressed in hash.
-
#max_cloud_cover ⇒ Object
Maximum cloud cover you are willing to tolerate.
-
#max_percent_rain ⇒ Object
Maximum change of rain you are willing to tolerate.
-
#max_wind_speed ⇒ Object
Maximum wind speed you are willing to tolerate.
-
#temp_range_delta ⇒ Object
The delta for slightly less than ideal temperate range in fahrenheit.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
For configuring WeatherJudge with block style.
Instance Attribute Details
#forecast_io_api_key ⇒ Object
11 12 13 |
# File 'lib/weather_judge/configuration.rb', line 11 def forecast_io_api_key @forecast_io_api_key end |
#ideal_temp_range ⇒ Object
Ideal temperature range in fahrenheit expressed in hash
31 32 33 |
# File 'lib/weather_judge/configuration.rb', line 31 def ideal_temp_range @ideal_temp_range || { min: 67, max: 77 } end |
#max_cloud_cover ⇒ Object
Maximum cloud cover you are willing to tolerate
16 17 18 |
# File 'lib/weather_judge/configuration.rb', line 16 def max_cloud_cover @max_cloud_cover end |
#max_percent_rain ⇒ Object
Maximum change of rain you are willing to tolerate
21 22 23 |
# File 'lib/weather_judge/configuration.rb', line 21 def max_percent_rain @max_percent_rain end |
#max_wind_speed ⇒ Object
Maximum wind speed you are willing to tolerate. Default is 15mph.
26 27 28 |
# File 'lib/weather_judge/configuration.rb', line 26 def max_wind_speed @max_wind_speed || 15 end |
#temp_range_delta ⇒ Object
The delta for slightly less than ideal temperate range in fahrenheit
36 37 38 |
# File 'lib/weather_judge/configuration.rb', line 36 def temp_range_delta @temp_range_delta || 10 end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
For configuring WeatherJudge with block style
7 8 9 |
# File 'lib/weather_judge/configuration.rb', line 7 def configure yield self end |