Method: Chef::ActionCollection::ActionRecord#current_resource

Defined in:
lib/chef/action_collection.rb

#current_resourceChef::Resource

for non-why-run-safe resources in why-run mode, or if load_current_resource itself threw an exception (which should be considered a bug in that load_current_resource implementation, but must be handled), or for unprocessed resources.

Returns:

  • (Chef::Resource)

    The current_resource object (before-state). This can be nil



35
36
37
# File 'lib/chef/action_collection.rb', line 35

def current_resource
  @current_resource
end