Class: RRDNotifier::AlarmTooHigh

Inherits:
Alarm
  • Object
show all
Defined in:
lib/rrd-grapher/notifier/alarms.rb

Direct Known Subclasses

AlarmTooLow

Instance Attribute Summary collapse

Attributes inherited from Alarm

#packet

Instance Method Summary collapse

Methods inherited from Alarm

#method_missing

Constructor Details

#initialize(p, threshold) ⇒ AlarmTooHigh

Returns a new instance of AlarmTooHigh.



26
27
28
29
# File 'lib/rrd-grapher/notifier/alarms.rb', line 26

def initialize(p, threshold)
  super(p)
  @threshold = threshold
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RRDNotifier::Alarm

Instance Attribute Details

#thresholdObject

Returns the value of attribute threshold.



24
25
26
# File 'lib/rrd-grapher/notifier/alarms.rb', line 24

def threshold
  @threshold
end

Instance Method Details

#is_same?(threshold) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/rrd-grapher/notifier/alarms.rb', line 31

def is_same?(threshold)
  @threshold == threshold
end

#reasonObject



22
# File 'lib/rrd-grapher/notifier/alarms.rb', line 22

def reason; :too_high; end