Method: Mongoid::Contexts::Enumerable#execute
- Defined in:
- lib/mongoid/contexts/enumerable.rb
#execute(paginating = false) ⇒ Object
Enumerable implementation of execute. Returns matching documents for the selector, and adds options if supplied.
Returns:
An Array of documents that matched the selector.
58 59 60 |
# File 'lib/mongoid/contexts/enumerable.rb', line 58 def execute(paginating = false) limit(documents.select { |document| document.matches?(selector) }) end |