Class: Mongoid::Haystack::Denormalization::Results
- Inherits:
-
Array
- Object
- Array
- Mongoid::Haystack::Denormalization::Results
- Includes:
- Pagination
- Defined in:
- lib/mongoid-haystack/search.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
Returns the value of attribute query.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Pagination
#_paginated, #method_missing, #paginate
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mongoid::Haystack::Pagination
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
206 207 208 |
# File 'lib/mongoid-haystack/search.rb', line 206 def query @query end |
Class Method Details
.for(query) ⇒ Object
208 209 210 211 212 213 214 |
# File 'lib/mongoid-haystack/search.rb', line 208 def Results.for(query) Results.new.tap do |results| results.query = query results.replace(query._denormalized) results._paginated.replace(query._paginated) rescue nil end end |
Instance Method Details
#models ⇒ Object
216 217 218 |
# File 'lib/mongoid-haystack/search.rb', line 216 def models self end |