Class: ResourceBaseRule

Inherits:
BaseRule show all
Defined in:
lib/cfn-nag/custom_rules/resource_base_rule.rb

Overview

Check for a resource from being used

Direct Known Subclasses

AmazonSimpleDBDomainRule

Instance Method Summary collapse

Methods inherited from BaseRule

#audit

Instance Method Details

#audit_impl(cfn_model) ⇒ Object


12
13
14
15
# File 'lib/cfn-nag/custom_rules/resource_base_rule.rb', line 12

def audit_impl(cfn_model)
  violating_resources = cfn_model.resources_by_type(resource_type)
  violating_resources.map(&:logical_resource_id)
end

#resource_typeObject


8
9
10
# File 'lib/cfn-nag/custom_rules/resource_base_rule.rb', line 8

def resource_type
  raise 'must implement in subclass'
end