Class: AbideDevUtils::CEM::Validate::Strings::PuppetClassValidator

Inherits:
BaseValidator
  • Object
show all
Defined in:
lib/abide_dev_utils/cem/validate/strings/puppet_class_validator.rb

Overview

Validates a Puppet Class from a Puppet Strings hash

Direct Known Subclasses

PuppetDefinedTypeValidator

Constant Summary

Constants inherited from BaseValidator

BaseValidator::PDK_DESCRIPTION_REGEX, BaseValidator::PDK_SUMMARY_REGEX, BaseValidator::SAFE_OBJECT_METHODS

Instance Attribute Summary

Attributes inherited from BaseValidator

#findings

Instance Method Summary collapse

Methods inherited from BaseValidator

#errors, #errors?, #find_parameter, #find_tag_name, #initialize, #license_tag?, #non_generic_description?, #non_generic_summary?, #select_tag_name, #validate, #warnings, #warnings?

Constructor Details

This class inherits a constructor from AbideDevUtils::CEM::Validate::Strings::BaseValidator

Instance Method Details

#finding_data(**data) ⇒ Hash

Returns Hash of basic class data to be used in findings.

Returns:

  • (Hash)

    Hash of basic class data to be used in findings



18
19
20
# File 'lib/abide_dev_utils/cem/validate/strings/puppet_class_validator.rb', line 18

def finding_data(**data)
  data
end

#validate_puppet_classObject



12
13
14
15
# File 'lib/abide_dev_utils/cem/validate/strings/puppet_class_validator.rb', line 12

def validate_puppet_class
  check_text_or_summary
  check_params
end