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] the after_resource
object (after-state). This can be nil for non custom-resources or resources that do not implement load_after_resource.
@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 [Hash] JSON-formatted error description from the Chef::Formatters::ErrorMapper
@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]
@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 75 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 82 def success? !exception end