Module: Controls::Client::Guidance

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

Overview

A module to encapsulate API methods related to guidance

Since:

  • API v1.0

Version:

  • v1.0.0

Guidance Methods collapse

Instance Method Details

#guidance(name) ⇒ Hash

Returns a hash representing the matching guidance.

Parameters:

  • name (String)

    the name of the guidance to search for

Returns:

  • (Hash)

    a hash representing the matching guidance

Since:

  • API v1.0



11
12
13
# File 'lib/controls/client/guidance.rb', line 11

def guidance(name)
  get "/guidance/#{name}"
end

#guidance_by_threat(threat) ⇒ Array<Hash>

Returns an array of “guidance hashes”.

Parameters:

  • threat (String)

    the threat name to search by

Returns:

  • (Array<Hash>)

    an array of “guidance hashes”

Since:

  • API v1.0



17
18
19
# File 'lib/controls/client/guidance.rb', line 17

def guidance_by_threat(threat)
  get "/threats/#{threat}/guidance"
end