Class: Profile
- Inherits:
-
Object
- Object
- Profile
- Defined in:
- lib/cfn-nag/profile.rb
Overview
Container class for profiles
Instance Attribute Summary collapse
-
#rule_ids ⇒ Object
readonly
Returns the value of attribute rule_ids.
Instance Method Summary collapse
-
#add_rule(rule_id) ⇒ Object
Add a Rule to a profile.
-
#execute_rule?(rule_id) ⇒ Boolean
Does the list of rule ids contain rule_id?.
-
#initialize ⇒ Profile
constructor
A new instance of Profile.
Constructor Details
#initialize ⇒ Profile
Returns a new instance of Profile.
7 8 9 |
# File 'lib/cfn-nag/profile.rb', line 7 def initialize @rule_ids = Set.new end |
Instance Attribute Details
#rule_ids ⇒ Object (readonly)
Returns the value of attribute rule_ids.
5 6 7 |
# File 'lib/cfn-nag/profile.rb', line 5 def rule_ids @rule_ids end |
Instance Method Details
#add_rule(rule_id) ⇒ Object
Add a Rule to a profile
12 13 14 |
# File 'lib/cfn-nag/profile.rb', line 12 def add_rule(rule_id) @rule_ids << rule_id end |
#execute_rule?(rule_id) ⇒ Boolean
Does the list of rule ids contain rule_id?
17 18 19 |
# File 'lib/cfn-nag/profile.rb', line 17 def execute_rule?(rule_id) @rule_ids.include? rule_id end |