Class: Inspec::Profile::AstHelper::TitleCollector

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



111
112
113
114
115
116
# File 'lib/inspec/utils/profile_ast_helpers.rb', line 111

def on_send(node)
  if RuboCop::AST::NodePattern.new("(send nil? :title ...)").match(node)
    # TODO - title may not be a simple string
    memo[:title] = node.children[2].value
  end
end