Class: Profile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProfile

Returns a new instance of Profile.



6
7
8
# File 'lib/cfn-nag/profile.rb', line 6

def initialize
  @rule_ids = Set.new
end

Instance Attribute Details

#rule_idsObject (readonly)

Returns the value of attribute rule_ids.



4
5
6
# File 'lib/cfn-nag/profile.rb', line 4

def rule_ids
  @rule_ids
end

Instance Method Details

#add_rule(rule_id) ⇒ Object



10
11
12
# File 'lib/cfn-nag/profile.rb', line 10

def add_rule(rule_id)
  @rule_ids << rule_id
end

#execute_rule?(rule_id) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/cfn-nag/profile.rb', line 14

def execute_rule?(rule_id)
  @rule_ids.include? rule_id
end