Class: Emasser::CMMC

Inherits:
SubCommandBase show all
Defined in:
lib/emasser/get.rb

Overview

The Cybersecurity Maturity Model Certification (CMMC) Assessments endpoint provides the ability to view CMMC assessment information. It is available to CMMC eMASS only.

Endpoints:

/api/cmmc-assessments - Get CMMC assessment information

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner

Methods included from OutputConverters

#change_to_datetime, #to_output_hash

Methods included from InputConverters

#to_input_hash

Methods included from OptionsParser

#optional_options, #required_options

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


712
713
714
# File 'lib/emasser/get.rb', line 712

def self.exit_on_failure?
  true
end

Instance Method Details

#assessmentsObject



722
723
724
725
726
727
728
# File 'lib/emasser/get.rb', line 722

def assessments
  result = EmassClient::CMMCAssessmentsApi.new.get_cmmc_assessments(options[:sinceDate])
  puts to_output_hash(result).green
rescue EmassClient::ApiError => e
  puts 'Exception when calling ApprovalChainApi->get_cmmc_assessments'.red
  puts to_output_hash(e)
end