Module: Mongoid::Criteria::Queryable::Macroable
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Extended In:
| |
Defined in: | lib/mongoid/criteria/queryable/macroable.rb |
Overview
Adds macro behavior for adding symbol methods.
Instance Method Summary
-
#key(name, strategy, operator, additional = nil, &block)
Adds a method on
::Symbol
for convenience in where queries for the provided operators.
Instance Method Details
#key(name, strategy, operator, additional = nil, &block)
Adds a method on ::Symbol
for convenience in where queries for the provided operators.
# File 'lib/mongoid/criteria/queryable/macroable.rb', line 21
def key(name, strategy, operator, additional = nil, &block) ::Symbol.add_key(name, strategy, operator, additional, &block) end