Sha256: 909c3ebebe154685418bc947d3ebc952f730b6cf0b8203b324358826f658cb45

Contents?: true

Size: 319 Bytes

Versions: 4

Compression:

Stored size: 319 Bytes

Contents

class ThinkingSphinx::Masks::WeightEnumeratorMask
  def initialize(search)
    @search = search
  end

  def can_handle?(method)
    public_methods(false).include?(method)
  end

  def each_with_weight(&block)
    @search.raw.each_with_index do |row, index|
      yield @search[index], row['@weight']
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.5 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.0.4 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.0.3 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.0.2 lib/thinking_sphinx/masks/weight_enumerator_mask.rb