Class: Updawg::ThresholdCheck
- Defined in:
- lib/updawg/checks/threshold_check.rb
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
-
#initialize(name, options = {}, &block) ⇒ ThresholdCheck
constructor
A new instance of ThresholdCheck.
Methods inherited from Check
#error, #error!, #pass, #pass!, #perform, #warning, #warning!
Constructor Details
#initialize(name, options = {}, &block) ⇒ ThresholdCheck
Returns a new instance of ThresholdCheck.
3 4 5 6 7 8 9 10 |
# File 'lib/updawg/checks/threshold_check.rb', line 3 def initialize(name, = {}, &block) super(name, , &block) unknown_keys = .keys - [:error_under, :error_over, :warning_under, :warning_over].flatten raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless unknown_keys.empty? @options = end |