Class: Threatstack::Alert::Alert

Inherits:
Object
  • Object
show all
Includes:
Serializable
Defined in:
lib/threatstack/alert/alert.rb

Instance Attribute Summary

Attributes included from Serializable

#raw

Instance Method Summary collapse

Methods included from Serializable

#attrs, included, #initialize, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Threatstack::Serializable

Instance Method Details

#latest_eventsObject



11
12
13
14
15
# File 'lib/threatstack/alert/alert.rb', line 11

def latest_events
  raw['latest_events'].map do |event|
    Event.new(event)
  end
end

#ruleObject



17
18
19
# File 'lib/threatstack/alert/alert.rb', line 17

def rule
  Rule.new(raw['rule'])
end