diff options
author | John Keiser <john@johnkeiser.com> | 2015-07-29 15:31:36 -0600 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-07-31 12:42:28 -0600 |
commit | 05c59d70345598da5bb0e7ccc2f4ebaf85adcb73 (patch) | |
tree | b9054251567a2ecff2b810b1d9cac55f486d8d69 /lib/chef/resource.rb | |
parent | 6aa94e70cde907e9c890307a82fb50af3d46f9df (diff) | |
download | chef-05c59d70345598da5bb0e7ccc2f4ebaf85adcb73.tar.gz |
Add current_value_does_not_exist! API, pretty up the output
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index b6355dab55..39fd05305f 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -18,6 +18,7 @@ # limitations under the License. # +require 'chef/exceptions' require 'chef/mixin/params_validate' require 'chef/dsl/platform_introspection' require 'chef/dsl/data_query' @@ -1384,9 +1385,16 @@ class Chef # created resource with its identity values filled in. # def self.load_current_value(&load_block) + include LoadCurrentValueDSL define_method(:load_current_value!, &load_block) end + module LoadCurrentValueDSL + def current_value_does_not_exist! + raise Chef::Exceptions::CurrentValueDoesNotExist + end + end + # # Get the current actual value of this resource. # |