Class: Threatstack::Alert

Inherits:
Object
  • Object
show all
Includes:
Serializable
Defined in:
lib/threatstack/entities/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



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

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

#ruleObject



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

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