class Chef::ActionCollection::ActionRecord
Attributes
@return [Symbol] # The action that was run (or scheduled to run in the case of “unprocessed” resources).
@return [Chef::Resource::Conditional] The conditional that caused the resource to be skipped
@return [Chef::Resource] The current_resource
object (before-state). This can be nil 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.
@return [Numeric] The elapsed time in seconds with machine precision
@return [Exception] The exception that was thrown
The “nesting” level. Outer resources in recipe context are 0 here, while for every sub-resource_collection inside of a custom resource this number is incremented by 1. Resources that are fired via build-resource or manually creating and firing
@return [Integer]
XXX: this is buggy since we (ab)use this resource for “after” state and it may be inaccurate and it may be mutated by the user. A third after_resource should be added to new_resource
+ current_resource
to properly implement this.
@return [Chef::Resource] The declared resource state.
The status of the resource:
- updated: ran and converged - up_to_date: skipped due to idempotency - skipped: skipped due to a conditional - failed: failed with an exception - unprocessed: resources that were not touched by a run that failed
@return [Symbol] status
Public Class Methods
# File lib/chef/action_collection.rb, line 72 def initialize(new_resource, action, nesting_level) @new_resource = new_resource @action = action @nesting_level = nesting_level end
Public Instance Methods
@return [Boolean] true if there was no exception
# File lib/chef/action_collection.rb, line 79 def success? !exception end