Sha256: 0b6595980d6eac60c6b79c77d26f3c266c5ad707938dcdc77113cf0eceae40f7

Contents?: true

Size: 313 Bytes

Versions: 31

Compression:

Stored size: 313 Bytes

Contents

module PatronusFati::DataObservers
  class AlertObserver
    include DataMapper::Observer

    observe PatronusFati::DataModels::Alert

    after :save do
      [src_mac, dst_mac, other_mac].uniq.map(&:update_cached_counts!)
      PatronusFati.event_handler.event(:alert, :new, self.full_state)
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
patronus_fati-0.9.11 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.10 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.9 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.8 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.7 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.6 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.5 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.4 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.3 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.2 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.1 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.9.0 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.18 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.17 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.16 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.15 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.14 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.13 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.12 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.11 lib/patronus_fati/data_observers/alert_observer.rb