class RuboCop::Cop::Chef::Modernize::UseChefLanguageSystemdHelper
Chef
Infra Client 15.5 and later include a ‘systemd?` helper for checking if a Linux system uses systemd.
@example
### incorrect node['init_package'] == 'systemd' ### correct systemd?
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
Source
# File lib/rubocop/cop/chef/modernize/use_chef_language_systemd_helper.rb, line 49 def on_send(node) node_init_package?(node) do |_cloud_name| add_offense(node, severity: :refactor) do |corrector| corrector.replace(node, 'systemd?') end end end