class RuboCop::Cop::Chef::Style::UnnecessaryPlatformCaseStatement

Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement.

@example

### incorrect
case node['platform']
when 'ubuntu'
  log "We're on Ubuntu"
  apt_update
end

case node['platform_family']
when 'rhel'
  include_recipe 'yum'
end

### correct
if platform?('ubuntu')
  log "We're on Ubuntu"
  apt_update
end

include_recipe 'yum' if platform_family?('rhel')