macfanatic/motion_data_wrapper — pull request #15 by macfanatic (2013-10-24 01:51:01+00:00)
Title: Added support for defining named scopes

Add support for defining named scopes on a model, providing class & relation-level methods for chain-ability.

```ruby
class Task
scope :overdue, ->{ where "date < ?", NSDate.date }
end

Task.overdue
# => Relation

Task.overdue.count
# => 0

Task.where("title = ?", "My Task").overdue
# => Relation

Task.overdue.exists?
# => false
```