Sha256: 8e9ead5f08a068890343296aac674af410db3c3cb863e8554220ae7ad2638eca

Contents?: true

Size: 387 Bytes

Versions: 9

Compression:

Stored size: 387 Bytes

Contents

module PatronusFati::MessageProcessor::Alert
  include PatronusFati::MessageProcessor

  def self.process(obj)
    PatronusFati.event_handler.event(:alert, :new, process_obj(obj))

    nil
  end

  def self.process_obj(obj)
    {
      created_at: obj[:sec],
      message: obj[:text],

      source: obj[:source],
      destination: obj[:dest],
      other: obj[:other]
    }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
patronus_fati-0.9.20 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.19 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.18 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.17 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.16 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.15 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.14 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.13 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.12 lib/patronus_fati/message_processor/alert.rb