Sha256: df037524c5707579245156f659544cea07c26f0c8f41d0fba2dd9d0092aeaa77

Contents?: true

Size: 276 Bytes

Versions: 3

Compression:

Stored size: 276 Bytes

Contents

module Sunspot
  class NullResult
    class Group < Struct.new(:value, :collection)

      def solr_docs
        collection.map { |item| "#{item.class.to_s} #{item.id}" }
      end

      def hits
        collection.map { |item| Hit.new item.id }
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sunspot-null_result-0.4.1 lib/sunspot/null_result/group.rb
sunspot-null_result-0.4.0 lib/sunspot/null_result/group.rb
sunspot-null_result-0.3.0 lib/sunspot/null_result/group.rb