Module: Controls::Client::Threats

Included in:
Controls::Client
Defined in:
lib/controls/client/threats.rb

Overview

A module to encapsulate API methods related to threats and threat vectors

Since:

  • API v1.0

Version:

  • v1.0.0

Threat Methods collapse

Instance Method Details

#threats(threat = nil) ⇒ String

Returns a hash representing the specified threat.

Parameters:

  • threat (String) (defaults to: nil)

    the threat name to search for

Returns:

  • (String)

    a hash representing the specified threat

Since:

  • API v1.0



11
12
13
14
15
16
17
# File 'lib/controls/client/threats.rb', line 11

def threats(threat = nil)
  if threat
    get "/threats/#{threat}"
  else
    get '/threats'
  end
end