class Threatstack::Response

Attributes

client[R]
entity[R]
raw[R]

Public Instance Methods

agents() click to toggle source
# File lib/threatstack/response.rb, line 15
def agents
  raise InvalidEntity unless entity == :agent
  raw.map{ |a| Agent.new(a, client) }
end
alerts() click to toggle source
# File lib/threatstack/response.rb, line 20
def alerts
  raise InvalidEntity unless entity == :alert
  raw.map{ |a| Alert.new(a, client) }
end
cves() click to toggle source
# File lib/threatstack/response.rb, line 25
def cves
  raise InvalidEntity unless entity == :cve
  raw.map{ |a| Cve.new(a, client) }
end
list() click to toggle source
# File lib/threatstack/response.rb, line 40
def list
  raw.map { |g| GenericObject.new(g, client) }
end
rules() click to toggle source
# File lib/threatstack/response.rb, line 35
def rules
  raise InvalidEntity unless entity == :rule
  raw.map{ |r| Rule.new(r, client) }
end
rulesets() click to toggle source
# File lib/threatstack/response.rb, line 30
def rulesets
  raise InvalidEntity unless entity == :ruleset
  raw.map{ |r| Ruleset.new(r, client) }
end