foursquare/rogue — pull request #36 by nsanch (2011-11-08 23:12:02+00:00)
Title: Add pullWhere and pullObjectWhere to ListModifyField's

Add ability to pull from a list based on a predicate instead of just by
specifying an exact value. For lists of objects, you can also use
pullObjectWhere to have predicates based on subfields.

Example use:

Venue.where(_.legacyid eqs 1)
.modify(_.tags pullWhere(_ startsWith "badprefix"))

Or with a list of sub-objects:

Venue.where(_.legacyid eqs 1)
.modify(_.claims pullObjectWhere(_.subfield(_.status) eqs ClaimStatus.approved))

You can also specify a list of predicates:

Venue.where(_.legacyid eqs 1)
.modify(_.claims pullObjectWhere(_.subfield(_.status) eqs ClaimStatus.approved,
_.subfield(_.userid) eqs 2097))

Second attempt at pull request because I accidentally lost part of the commit when I pushed it back to github.