Sha256: b9fc8833801c0aae9621e96cb8b0c8e8fc0ac920d4bb2921aa6981c757ea59dd

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

# -*- encoding : utf-8 -*-
module Dbla
  class Response < AbstractResponse
    def initialize(data, request_params, options = {})
      super(force_to_utf8(data))
      @request_params = request_params
      self.document_model = options[:solr_document_model] || options[:document_model] || Item
      self.blacklight_config = options[:blacklight_config]
      if data
        @total = data['count']
        @documents = (data['docs'] || []).map {|d| document_model.new(d,self)}
        @start = data['start']
        @limit = data['limit']
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dbla-0.0.2 lib/dbla/response.rb