Class: RuboCop::Cop::Chef::Style::ImmediateNotificationTiming
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/chef/style/immediate_notification_timing.rb
Overview
Use :immediately instead of :immediate for resource notification timing.
Constant Summary collapse
- MSG =
'Use :immediately instead of :immediate for resource notification timing'
- RESTRICT_ON_SEND =
[:notifies, :subscribes].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/rubocop/cop/chef/style/immediate_notification_timing.rb', line 48 def on_send(node) immediate_notify?(node) do |timing| add_offense(timing, severity: :refactor) do |corrector| corrector.replace(timing, ':immediately') end end end |