Sha256: db814037a2cce627ef2c83c9a6a91cc7591477fb7f1a9c2e130392a745c12ad0

Contents?: true

Size: 618 Bytes

Versions: 5

Compression:

Stored size: 618 Bytes

Contents

class ThinkingSphinx::Search::Context
  attr_reader :search, :configuration

  def initialize(search, configuration = nil)
    @search        = search
    @configuration = configuration || ThinkingSphinx::Configuration.instance
    @memory        = {
      :results => [],
      :panes   => ThinkingSphinx::Configuration::Defaults::PANES
    }
  end

  def [](key)
    @memory[key]
  end

  def []=(key, value)
    @memory[key] = value
  end

  def log(notification, message, &block)
    ActiveSupport::Notifications.instrument(
      "#{notification}.thinking_sphinx", notification => message, &block
    )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.2 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.1 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.0 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.0.rc lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.0.pre lib/thinking_sphinx/search/context.rb