class ChefCLI::PolicyfileServices::Undelete

def restore(undo_record)

def restore(undo_record)
  undo_record.policy_revisions.each do |policy_info|
    if policy_info.policy_group.nil?
      recreate_as_orphan(policy_info)
    else
      recreate_and_associate_to_group(policy_info)
    end
  end
  if ( restored_policy_group = undo_record.policy_groups.first )
    ui.msg("Restored policy group '#{restored_policy_group}'")
  end
end