Sha256: 081278c3fd0a7d4b16bbbc8be76274493ec543f17f45ffa806de55a4c5760946

Contents?: true

Size: 411 Bytes

Versions: 11

Compression:

Stored size: 411 Bytes

Contents

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 method_missing(method, *args)
    ::ThinkingSphinx::ActiveRecord::Column.new method, *args
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
thinking-sphinx-3.1.1 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.1.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.6 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.5 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.4 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.3 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.2 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.1 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.0 lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.0.rc lib/thinking_sphinx/core/interpreter.rb
thinking-sphinx-3.0.0.pre lib/thinking_sphinx/core/interpreter.rb