chef/lib/chef/formatters/doc.rb
# Called when a change has been made to a resource. May be called multiple
# times per resource, e.g., a file may have its content updated, and then
# its permissions updated.
Called when a change has been made to a resource. May be called multiple
times per resource, e.g., a file may have its content updated, and then
its permissions updated.
Called when a change has been made to a resource . May be called multiple times per resource e . g . a file may have its content updated and then its permissions updated .
def resource_update_applied(resource, action, update)
        prefix = Chef::Config[:why_run] ? "Would " : ""
        Array(update).each do |line|
          next if line.nil? 
          output_record line
          if line.kind_of? String
            @output.color "\n    - #{prefix}#{line}", :green
          elsif line.kind_of? Array 
            line.each do |detail|
              @output.color "\n        #{detail}", :white
            end
          end
        end
      end
def resource_update_applied ( resource , action , update ) prefix = Chef :: Config [ :why_run ] ? "Would " : "" Array ( update ) . each do | line | next if line . nil? output_record line if line . kind_of? String @output . color "\n    - #{prefix}#{line}" , :green elsif line . kind_of? Array line . each do | detail | @output . color "\n        #{detail}" , :white end end end end
Called when a change has been made to a resource.
Called when a change has been made to a resource .
# Expanded output - delta  # @todo should we have a resource_update_delta callback? 
resource
<not_specific>
action
<not_specific>
update
<not_specific>