Sha256: c9099e0c693e7dd9371b7475e565b8bf48ac6ee5d663d56b51fad34a06c73c83
Contents?: true
Size: 444 Bytes
Versions: 17
Compression:
Stored size: 444 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::BatchedSearch attr_accessor :searches def initialize @searches = [] end def populate(middleware = ThinkingSphinx::Middlewares::DEFAULT) return if populated? || searches.empty? middleware.call contexts searches.each &:populated! @populated = true end private def contexts searches.collect &:context end def populated? @populated end end
Version data entries
17 entries across 17 versions & 1 rubygems