Method: Chef::RunContext#notifies_before
- Defined in:
- lib/chef/run_context.rb
#notifies_before(notification) ⇒ Object
Adds an before notification to the before_notification_collection.
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/chef/run_context.rb', line 279 def notifies_before(notification) # Note for the future, notification.notifying_resource may be an instance # of Chef::Resource::UnresolvedSubscribes when calling {Resource#subscribes} # with a string value. if unified_mode && updated_resources.include?(notification..declared_key) raise Chef::Exceptions::UnifiedModeBeforeSubscriptionEarlierResource.new(notification) end before_notification_collection[notification..declared_key] << notification end |