Class: JmesPathDiscovery

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

Instance Method Summary collapse

Constructor Details

#initialize(rule_registry) ⇒ JmesPathDiscovery

Returns a new instance of JmesPathDiscovery.



2
3
4
# File 'lib/cfn-nag/jmes_path_discovery.rb', line 2

def initialize(rule_registry)
  @rule_registry = rule_registry
end

Instance Method Details

#failure(id:, jmespath:, message:) ⇒ Object



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

def failure(id:, jmespath:, message:)
  @rule_registry.definition(id: id,
                            type: Violation::FAILING_VIOLATION,
                            message: message)
end

#warning(id:, jmespath:, message:) ⇒ Object



6
7
8
9
10
# File 'lib/cfn-nag/jmes_path_discovery.rb', line 6

def warning(id:, jmespath:, message:)
  @rule_registry.definition(id: id,
                            type: Violation::WARNING,
                            message: message)
end