class RuboCop::Cop::Chef::Modernize::OsxConfigProfileResource

The osx_config_profile resource was renamed to osx_profile. The new resource name should be used.

@example

#### incorrect
osx_config_profile 'Install screensaver profile' do
  profile 'screensaver/com.company.screensaver.mobileconfig'
end

#### correct
osx_profile 'Install screensaver profile' do
  profile 'screensaver/com.company.screensaver.mobileconfig'
end

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb, line 42
def on_send(node)
  add_offense(node, message: MSG, severity: :refactor) do |corrector|
    corrector.replace(node, node.source.gsub(/^osx_config_profile/, 'osx_profile'))
  end
end