Class: BooleanBaseRule
- Inherits:
-
BaseRule
show all
- Defined in:
- lib/cfn-nag/custom_rules/boolean_base_rule.rb
Instance Method Summary
collapse
Methods inherited from BaseRule
#audit
Instance Method Details
#audit_impl(cfn_model) ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'lib/cfn-nag/custom_rules/boolean_base_rule.rb', line 16
def audit_impl(cfn_model)
resources = cfn_model.resources_by_type(resource_type)
violating_resources = resources.select do |resource|
not_truthy?(resource.send(boolean_property))
end
violating_resources.map(&:logical_resource_id)
end
|
#boolean_property ⇒ Object
12
13
14
|
# File 'lib/cfn-nag/custom_rules/boolean_base_rule.rb', line 12
def boolean_property
raise 'must implement in subclass'
end
|
#resource_type ⇒ Object
8
9
10
|
# File 'lib/cfn-nag/custom_rules/boolean_base_rule.rb', line 8
def resource_type
raise 'must implement in subclass'
end
|