Class: Threatstack::Alert

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

Instance Attribute Summary

Attributes included from Serializable

#client, #raw

Instance Method Summary collapse

Methods included from Serializable

#attrs, #camelize, 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

#agentObject



14
15
16
# File 'lib/threatstack/entities/alert.rb', line 14

def agent
  client.agent(agent_id)
end

#eventsObject



22
23
24
# File 'lib/threatstack/entities/alert.rb', line 22

def events
  event_ids&.map{ |event_id| client.event(id, event_id)}
end

#ruleObject



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

def rule
  client.rule(ruleset_id, rule_id)
end

#rulesetObject



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

def ruleset
  client.ruleset(ruleset_id)
end