summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Barnett <jason.w.barnett@gmail.com>2021-10-22 15:33:04 -0600
committerJason Barnett <jason.w.barnett@gmail.com>2021-10-22 17:36:11 -0600
commit00808c5bb9fc37d59e4fbd1286de9e72d850529d (patch)
treef2f6b9eec557e8734e6535e42fc6ea700e622ee2
parentce70c573c79d966ba94fe7992750fcf470068864 (diff)
downloadchef-00808c5bb9fc37d59e4fbd1286de9e72d850529d.tar.gz
Add #recipe_name to Chef::Provider
Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
-rw-r--r--lib/chef/provider.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb
index e7d7ca84ff..91add233f7 100644
--- a/lib/chef/provider.rb
+++ b/lib/chef/provider.rb
@@ -35,7 +35,6 @@ class Chef
attr_accessor :after_resource
attr_accessor :run_context
- attr_reader :recipe_name
attr_reader :logger
include Chef::Mixin::WhyRun
@@ -174,6 +173,10 @@ class Chef
new_resource.cookbook_name
end
+ def recipe_name
+ new_resource.recipe_name
+ end
+
# hook that subclasses can use to do lazy validation for where properties aren't flexible enough
def check_resource_semantics!; end