Sha256: 6378a9421725c89cb7f2628f3a247a75d50e9dc275f59678e87822a5a099c795

Contents?: true

Size: 624 Bytes

Versions: 5

Compression:

Stored size: 624 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.clone
    }
  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.1.0 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.6 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.5 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.4 lib/thinking_sphinx/search/context.rb
thinking-sphinx-3.0.3 lib/thinking_sphinx/search/context.rb