diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-12-11 15:21:50 -0800 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-12-15 11:03:13 -0800 |
commit | 45e7fcf05cdec63ac857eca46e55e8d3bb2dc0e6 (patch) | |
tree | 53a37055fca3f70f0f709f270192a7fbc75eaa36 | |
parent | 53a19630aacfb009f4c0344d0dc697c7f96dbdfa (diff) | |
download | chef-45e7fcf05cdec63ac857eca46e55e8d3bb2dc0e6.tar.gz |
Fixing some code I changed unecessarily
-rw-r--r-- | lib/chef/resource.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index 81642b8915..2e2bd2c84e 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -349,9 +349,9 @@ class Chef case timing.to_s when 'delayed' - run_context.notifies_delayed(Notification.new(resource_spec, action, self)) + notifies_delayed(action, resource) when 'immediate', 'immediately' - run_context.notifies_immediately(Notification.new(resource_spec, action, self)) + notifies_immediately(action, resource) else raise ArgumentError, "invalid timing: #{timing} for notifies(#{action}, #{resources.inspect}, #{timing}) resource #{self} "\ "Valid timings are: :delayed, :immediate, :immediately" @@ -373,6 +373,14 @@ class Chef } end + def notifies_immediately(action, resource_spec) + run_context.notifies_immediately(Notification.new(resource_spec, action, self)) + end + + def notifies_delayed(action, resource_spec) + run_context.notifies_delayed(Notification.new(resource_spec, action, self)) + end + def immediate_notifications run_context.immediate_notifications(self) end |