Sha256: f9d13cd4a4aea4d321b31f90fba53d5a7ce602d97195fecb9227a19548a82af4

Contents?: true

Size: 316 Bytes

Versions: 2

Compression:

Stored size: 316 Bytes

Contents

class ThinkingSphinx::Search::BatchInquirer
  def initialize(&block)
    @queries = []

    yield self if block_given?
  end

  def append_query(query)
    @queries << query
  end

  def results
    @results ||= begin
      @queries.freeze

      ThinkingSphinx::Connection.new.query_all *@queries
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.0 lib/thinking_sphinx/search/batch_inquirer.rb
thinking-sphinx-3.0.0.rc lib/thinking_sphinx/search/batch_inquirer.rb