class ThinkingSphinx::BatchedSearch
Attributes
searches[RW]
Public Class Methods
new()
click to toggle source
# File lib/thinking_sphinx/batched_search.rb, line 6 def initialize @searches = [] end
Public Instance Methods
populate(middleware = ThinkingSphinx::Middlewares::DEFAULT)
click to toggle source
# File lib/thinking_sphinx/batched_search.rb, line 10 def populate(middleware = ThinkingSphinx::Middlewares::DEFAULT) return if populated? || searches.empty? middleware.call contexts searches.each &:populated! @populated = true end
Private Instance Methods
contexts()
click to toggle source
# File lib/thinking_sphinx/batched_search.rb, line 21 def contexts searches.collect &:context end
populated?()
click to toggle source
# File lib/thinking_sphinx/batched_search.rb, line 25 def populated? @populated end