Class: WrfForecast::Threshold::ThresholdValue

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(identifier, is_active, warning_text) ⇒ ThresholdValue

initialization

Parameters:

  • identifier (Symbol)

    the symbol that identifies the threshold

  • is_active (boolean)

    a bool flag that indicated if the threshold was activated

  • warning_text (String)

    the corresponding warning text to the threshold



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

#identifierSymbol (readonly)

Returns the symbol that identifies the threshold.

Returns:

  • (Symbol)

    the symbol that identifies the threshold



9
10
11
# File 'lib/wrf_forecast/threshold/threshold_value.rb', line 9

def identifier
  @identifier
end

#is_activeboolean

Returns a bool flag that indicated if the threshold was activated.

Returns:

  • (boolean)

    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_textString (readonly)

Returns the corresponding warning text to the threshold.

Returns:

  • (String)

    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