Class: RuboCop::Cop::Chef::RedundantCode::AttributeMetadata
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp, RuboCop::Chef::AutocorrectHelpers
- Defined in:
- lib/rubocop/cop/chef/redundant/attribute_metadata.rb
Overview
The attribute metadata.rb method is not used and is unnecessary in cookbooks.
Constant Summary collapse
- MSG =
'The attribute metadata.rb method is not used and is unnecessary in cookbooks.'
- RESTRICT_ON_SEND =
[:attribute].freeze
Instance Method Summary collapse
Methods included from RuboCop::Chef::AutocorrectHelpers
#expression_including_heredocs
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
43 44 45 46 47 |
# File 'lib/rubocop/cop/chef/redundant/attribute_metadata.rb', line 43 def on_send(node) add_offense(node, severity: :refactor) do |corrector| corrector.remove(range_with_surrounding_space(range: expression_including_heredocs(node), side: :left)) end end |