Class: WrfForecast::Threshold::ThresholdValue
- Inherits:
-
Object
- Object
- WrfForecast::Threshold::ThresholdValue
- Defined in:
- lib/wrf_forecast/threshold/threshold_value.rb
Overview
A simple data class that stores information for a given threshold
Instance Attribute Summary collapse
-
#identifier ⇒ Symbol
readonly
The symbol that identifies the threshold.
-
#is_active ⇒ boolean
A bool flag that indicated if the threshold was activated.
-
#warning_text ⇒ String
readonly
The corresponding warning text to the threshold.
Instance Method Summary collapse
-
#initialize(identifier, is_active, warning_text) ⇒ ThresholdValue
constructor
initialization.
Constructor Details
#initialize(identifier, is_active, warning_text) ⇒ ThresholdValue
initialization
19 20 21 22 23 |
# File 'lib/wrf_forecast/threshold/threshold_value.rb', line 19 def initialize(identifier, is_active, warning_text) @identifier = identifier @is_active = is_active @warning_text = warning_text end |
Instance Attribute Details
#identifier ⇒ Symbol (readonly)
Returns the symbol that identifies the threshold.
9 10 11 |
# File 'lib/wrf_forecast/threshold/threshold_value.rb', line 9 def identifier @identifier end |
#is_active ⇒ boolean
Returns a bool flag that indicated if the threshold was activated.
11 12 13 |
# File 'lib/wrf_forecast/threshold/threshold_value.rb', line 11 def is_active @is_active end |
#warning_text ⇒ String (readonly)
Returns the corresponding warning text to the threshold.
13 14 15 |
# File 'lib/wrf_forecast/threshold/threshold_value.rb', line 13 def warning_text @warning_text end |