Class: EorzeaWeather::Zone
- Inherits:
-
Struct
- Object
- Struct
- EorzeaWeather::Zone
- Defined in:
- lib/eorzea_weather/zone.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#rates ⇒ Object
Returns the value of attribute rates.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/eorzea_weather/zone.rb', line 2 def id @id end |
#rates ⇒ Object
Returns the value of attribute rates
2 3 4 |
# File 'lib/eorzea_weather/zone.rb', line 2 def rates @rates end |
Instance Method Details
#find_rate(rate) ⇒ Object
3 4 5 |
# File 'lib/eorzea_weather/zone.rb', line 3 def find_rate(rate) rates.find { |(threshold, _weather)| threshold.nil? || rate < threshold }[1] end |