Class: Inspec::Profile::AstHelper::ImpactCollector

Inherits:
CollectorBase
  • Object
show all
Defined in:
lib/inspec/utils/profile_ast_helpers.rb

Instance Attribute Summary

Attributes inherited from CollectorBase

#memo

Instance Method Summary collapse

Methods inherited from CollectorBase

#initialize

Constructor Details

This class inherits a constructor from Inspec::Profile::AstHelper::CollectorBase

Instance Method Details

#on_send(node) ⇒ Object



86
87
88
89
90
# File 'lib/inspec/utils/profile_ast_helpers.rb', line 86

def on_send(node)
  if RuboCop::AST::NodePattern.new("(send nil? :impact ...)").match(node)
    memo[:impact] = node.children[2].value
  end
end