Module: Controls::Client::ThreatVectors
- Included in:
- Controls::Client
- Defined in:
- lib/controls/client/threat_vectors.rb
Overview
A module to encapsulate API methods related to threats and threat vectors
Threat Vector Methods collapse
-
#threat_threat_vectors(threat) ⇒ Array<Hash>
(also: #threat_vectors_by_threat)
A list of hashes representing threats.
-
#threat_vectors(vector = nil) ⇒ String
A hash representing the specified threat vector.
Instance Method Details
#threat_threat_vectors(threat) ⇒ Array<Hash> Also known as: threat_vectors_by_threat
Returns a list of hashes representing threats.
21 22 23 |
# File 'lib/controls/client/threat_vectors.rb', line 21 def threat_threat_vectors(threat) get "/threats/#{threat}/threat_vectors" end |
#threat_vectors(vector = nil) ⇒ String
Returns a hash representing the specified threat vector.
11 12 13 14 15 16 17 |
# File 'lib/controls/client/threat_vectors.rb', line 11 def threat_vectors(vector = nil) if vector get "/threat_vectors/#{vector}" else get '/threat_vectors' end end |