Class: RuboCop::Cop::Chef::Correctness::InvalidDefaultAction
- Defined in:
- lib/rubocop/cop/chef/correctness/invalid_default_action.rb
Overview
Default actions in resources should be symbols or an array of symbols.
Constant Summary collapse
- MSG =
'Default actions in resources should be symbols or an array of symbols.'
- RESTRICT_ON_SEND =
[:default_action].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/rubocop/cop/chef/correctness/invalid_default_action.rb', line 38 def on_send(node) default_action?(node) do |match| return if %i(send sym array).include?(match.type) add_offense(node, severity: :refactor) end end |