Class: RRDNotifier::Alarm

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

Overview

An active alarm.

Direct Known Subclasses

AlarmClockDrift, AlarmMissingData, AlarmTooHigh

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(p) ⇒ Alarm

Returns a new instance of Alarm.



10
11
12
# File 'lib/rrd-grapher/notifier/alarms.rb', line 10

def initialize(p)
  @packet = p
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object



14
15
16
17
18
# File 'lib/rrd-grapher/notifier/alarms.rb', line 14

def method_missing(m, *args)
  if packet
    packet.send(m, *args)
  end
end

Instance Attribute Details

#packetObject

the packet which triggered the alarm



8
9
10
# File 'lib/rrd-grapher/notifier/alarms.rb', line 8

def packet
  @packet
end