class ChefCLI::Policyfile::UndoStack
def pop
def pop file_to_pop = undo_record_files.last if file_to_pop.nil? raise CantUndo, "No undo records exist in #{undo_dir}" end record = load_undo_record(file_to_pop) # if this hits an exception, we skip unlink yield record if block_given? File.unlink(file_to_pop) record end