Sha256: 1ab64cbf460eccd5757553a0e0d5731ab7de47931d63c5ff63661703cd7c596c

Contents?: true

Size: 736 Bytes

Versions: 1

Compression:

Stored size: 736 Bytes

Contents

class ThinkingSphinx::RealTime::Interpreter <
  ::ThinkingSphinx::Core::Interpreter

  def has(*columns)
    options = columns.extract_options!
    @index.attributes += columns.collect { |column|
      ::ThinkingSphinx::RealTime::Attribute.new column, options
    }
  end

  def indexes(*columns)
    options = columns.extract_options!
    @index.fields += columns.collect { |column|
      ::ThinkingSphinx::RealTime::Field.new column, options
    }
  end

  def scope(&block)
    @index.scope = block
  end

  def set_property(properties)
    properties.each do |key, value|
      @index.send("#{key}=", value)   if @index.class.settings.include?(key)
    end
  end

  def where(condition)
    @index.conditions << condition
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.5 lib/thinking_sphinx/real_time/interpreter.rb