Class: SimpleReport::UpdatedResources

Inherits:
Chef::Handler
  • Object
show all
Defined in:
lib/chef/handler/updated_resources.rb

Instance Method Summary collapse

Constructor Details

#initialize(line_prefix = " ") ⇒ UpdatedResources

Returns a new instance of UpdatedResources.



21
22
23
24
# File 'lib/chef/handler/updated_resources.rb', line 21

def initialize(line_prefix="  ")
  super()
  @line_prefix = line_prefix
end

Instance Method Details

#reportObject



26
27
28
29
30
31
32
33
# File 'lib/chef/handler/updated_resources.rb', line 26

def report
  if run_status.updated_resources
    Chef::Log.info "Resources updated this run:"
    run_status.updated_resources.each {|r| Chef::Log.info "#{@line_prefix}#{r.to_s}"}
  else
    Chef::Log.info "No Resources updated this run!"
  end
end