Class: RuleRepositoryLoader

Inherits:
Object show all
Defined in:
lib/cfn-nag/rule_repository_loader.rb

Overview

This captures logic for instantiating the RuleRepo implementations and merging their rule registries. This was baked into CustomRuleLoader but broken out for cfn_nag_rules to use as well

Instance Method Summary collapse

Instance Method Details

#merge(rule_registry, rule_repository_definitions) ⇒ Object


12
13
14
15
16
17
# File 'lib/cfn-nag/rule_repository_loader.rb', line 12

def merge(rule_registry, rule_repository_definitions)
  rule_repository_definitions.each do |rule_repository_definition|
    rule_registry.merge! rule_repository(rule_repository_definition).discover_rules
  end
  rule_registry
end