I was wondering if this can be improved upon.
I have two arrays: links and archived_releases.
links contains strings, that might appear in the :url key
of an archived_releases entry.
This didn’t work:
links.delete_if { |link|
archived_releases.count > archived_releases.delete_if{ |release| release[:url] == link }.count
}
So I came up with this:
links.delete_if { |link|
archived_releases.count > archived_releases.delete_if{ |release| release[:url] == link }.count
}
I would first pull out the
archived_releasesentries you want to quickly compare and then you can just use a quickinclude?check. Something like: