Module: RSolr::Ext::Response::Docs
- Defined in:
- lib/rsolr-ext/response/docs.rb
Defined Under Namespace
Modules: Pageable
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/rsolr-ext/response/docs.rb', line 3 def self.extended(base) d = base['response']['docs'] # TODO: could we do this lazily (Enumerable etc.) d.each{|doc| doc.extend RSolr::Ext::Doc } d.extend Pageable d.per_page = [base.rows, 1].max d.start = base.start d.total = base.total end |
Instance Method Details
#docs ⇒ Object
53 54 55 56 57 |
# File 'lib/rsolr-ext/response/docs.rb', line 53 def docs @docs ||= begin response['docs'] end end |