Class: RuboCop::Cop::Chef::Correctness::InvalidNotificationTiming
- Defined in:
- lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb
Overview
Valid notification timings are ‘:immediately`, `:immediate` (alias for :immediately), `:delayed`, and `:before`.
Constant Summary collapse
- MSG =
'Valid notification timings are :immediately, :immediate (alias for :immediately), :delayed, and :before.'
- RESTRICT_ON_SEND =
[:notifies, :subscribes].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
46 47 48 49 50 |
# File 'lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb', line 46 def on_send(node) notification_with_timing?(node) do |timing| add_offense(timing, severity: :refactor) unless %i(immediate immediately delayed before).include?(timing.value) end end |