class RuboCop::Cop::Chef::Deprecations::ChefWindowsPlatformHelper
Use ‘platform?(’windows’)‘ instead of the legacy `Chef::Platform.windows?` helper
@example
### incorrect Chef::Platform.windows? ### correct platform?('windows') platform_family?('windows')
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
Source
# File lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb, line 44 def on_send(node) chef_platform_windows?(node) do add_offense(node, severity: :warning) do |corrector| corrector.replace(node, "platform?('windows')") end end end