Class: RuboCop::Cop::Chef::Modernize::OsxConfigProfileResource
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb
Overview
The osx_config_profile resource was renamed to osx_profile. The new resource name should be used.
Constant Summary collapse
- MSG =
'The osx_config_profile resource was renamed to osx_profile. The new resource name should be used.'
- RESTRICT_ON_SEND =
[:osx_config_profile].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
42 43 44 45 46 |
# File 'lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb', line 42 def on_send(node) add_offense(node, severity: :refactor) do |corrector| corrector.replace(node, node.source.gsub(/^osx_config_profile/, 'osx_profile')) end end |