Module: WeatherJudge::Configuration

Included in:
WeatherJudge
Defined in:
lib/weather_judge/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#forecast_io_api_keyObject



11
12
13
# File 'lib/weather_judge/configuration.rb', line 11

def forecast_io_api_key
  @forecast_io_api_key
end

#ideal_temp_rangeObject

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_coverObject

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_rainObject

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_speedObject

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_deltaObject

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

Yields:

  • (_self)

Yield Parameters:



7
8
9
# File 'lib/weather_judge/configuration.rb', line 7

def configure
  yield self
end