summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-02-07 15:03:41 +0100
committerThom May <thom@chef.io>2018-03-08 11:32:01 +0000
commitc420eb377d2f25804ac3e69607d6c98990e941ae (patch)
tree0dc7bc03e879a9fcfc5250f67c1f2a8f2d2317e7
parentdc59a3208a71345f3112c5ce5b0a0f353cdc3a9b (diff)
downloadchef-c420eb377d2f25804ac3e69607d6c98990e941ae.tar.gz
actions can have descriptions and be introduced
Signed-off-by: Thom May <thom@chef.io>
-rw-r--r--lib/chef/provider.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb
index 9e9013b24e..3a6aee711f 100644
--- a/lib/chef/provider.rb
+++ b/lib/chef/provider.rb
@@ -198,6 +198,20 @@ class Chef
@requirements ||= ResourceRequirements.new(@new_resource, run_context)
end
+ def description(description = "NOT_PASSED")
+ if description != "NOT_PASSED"
+ @description = description
+ end
+ @description
+ end
+
+ def introduced(introduced = "NOT_PASSED")
+ if introduced != "NOT_PASSED"
+ @introduced = introduced
+ end
+ @introduced
+ end
+
def converge_by(descriptions, &block)
converge_actions.add_action(descriptions, &block)
end