Method: Moped::Collection#find

Defined in:
lib/moped/collection.rb

#find(selector = {}) ⇒ Query Also known as: where

Build a query for this collection.

Examples:

Build a query based on the provided selector.

collection.find(name: "Placebo")

Parameters:

  • selector (Hash) (defaults to: {})

    The query selector.

Returns:

  • (Query)

    The generated query.

Since:

  • 1.0.0



77
78
79
# File 'lib/moped/collection.rb', line 77

def find(selector = {})
  Query.new(self, selector)
end