Sha256: 3f0ce4d7d9a0e3a9807ad2f0a7a3974c041040a5655d7ba69a4738e2c27f3170

Contents?: true

Size: 350 Bytes

Versions: 8

Compression:

Stored size: 350 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[ThinkingSphinx::SphinxQL.weight[:column]]
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
thinking-sphinx-3.4.2 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.4.1 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.4.0 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.3.0 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.2.0 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.1.4 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.1.3 lib/thinking_sphinx/masks/weight_enumerator_mask.rb
thinking-sphinx-3.1.2 lib/thinking_sphinx/masks/weight_enumerator_mask.rb