module ChefCompat::CopiedFromChef::Chef::Provider::InlineResources

Public Instance Methods

compile_and_converge_action(&block) click to toggle source
# File files/lib/chef_compat/copied_from_chef/chef/provider.rb, line 121
def compile_and_converge_action(&block)
  old_run_context = run_context
  @run_context = run_context.create_child
  return_value = instance_eval(&block)
  Chef::Runner.new(run_context).converge
  return_value
ensure
  if run_context.resource_collection.any? { |r| r.updated? }
    new_resource.updated_by_last_action(true)
  end
  @run_context = old_run_context
end