Class: Threatstack::Agent

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

#ruleset_idsObject



13
14
15
# File 'lib/threatstack/entities/agent.rb', line 13

def ruleset_ids
  raw['rulesets']
end

#rulesetsObject



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

def rulesets
  ruleset_ids.each { |id| client.ruleset(id) }
end

#tagsObject



9
10
11
# File 'lib/threatstack/entities/agent.rb', line 9

def tags
  raw['tags'].map{ |t| Tag.new(t) }
end