Sha256: 3b5ade45be0102641e30154458309598d98a72315cb2171716b55c6576595318

Contents?: true

Size: 548 Bytes

Versions: 17

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true

class ThinkingSphinx::Core::Interpreter < BasicObject
  def self.translate!(index, block)
    new(index, block).translate!
  end

  def initialize(index, block)
    @index = index

    mod = ::Module.new
    mod.send :define_method, :translate!, block
    mod.send :extend_object, self
  end

  private

  def search_option?(key)
    ::ThinkingSphinx::Middlewares::SphinxQL::SELECT_OPTIONS.include? key
  end

  def method_missing(method, *args)
    ::ThinkingSphinx::ActiveRecord::Column.new method, *args
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.5.1 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.5.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.4.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.3.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.2.1 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.2.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.1.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-5.0.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.4.1 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.4.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.3.2 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.3.1 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.3.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.2.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.1.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-4.0.0 lib/thinking_sphinx/core/interpreter.rb