class ChefCLI::PolicyfileServices::CleanPolicyCookbooks
def cookbooks_to_clean
def cookbooks_to_clean active_cbs = active_cookbooks all_cookbooks.inject({}) do |cb_map, (cb_name, revisions)| active_revs = active_cbs[cb_name] || Set.new inactive_revs = Set.new(revisions) - active_revs cb_map[cb_name] = inactive_revs unless inactive_revs.empty? cb_map end end