lib/rsolr-ext/response.rb in mwmitchell-rsolr-ext-0.7.12 vs lib/rsolr-ext/response.rb in mwmitchell-rsolr-ext-0.7.31

- old
+ new

@@ -1,9 +1,10 @@ module RSolr::Ext::Response autoload :Facets, 'rsolr-ext/response/facets' autoload :Docs, 'rsolr-ext/response/docs' + autoload :Spelling, 'rsolr-ext/response/spelling' class Base < Mash def header self['responseHeader'] @@ -24,13 +25,19 @@ def initialize(*args) super(*args) extend Docs extend Facets + extend Spelling end def response - self['response'] + self[:response] + end + + # short cut to response['numFound'] + def total + response[:numFound] end end class Dismax < Standard \ No newline at end of file