foursquare/rogue — pull request #35 by nsanch (2011-11-07 23:04:24+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))