Module: RSolr::Response
- Defined in:
- lib/rsolr/response.rb
Defined Under Namespace
Modules: PaginatedDocSet
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/rsolr/response.rb', line 3 def self.extended base if base["response"] && base["response"]["docs"] base["response"]["docs"].tap do |d| d.extend PaginatedDocSet d.per_page = base.request[:params]["rows"] d.page_start = base.request[:params]["start"] d.page_total = base["response"]["numFound"].to_s.to_i end end end |
Instance Method Details
#with_indifferent_access ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rsolr/response.rb', line 14 def with_indifferent_access if {}.respond_to?(:with_indifferent_access) super.extend RSolr::Response else raise NoMethodError, "undefined method `with_indifferent_access' for #{self.inspect}:#{self.class.name}" end end |