class ThinkingSphinx::Masks::WeightEnumeratorMask
Public Class Methods
new(search)
click to toggle source
# File lib/thinking_sphinx/masks/weight_enumerator_mask.rb, line 2 def initialize(search) @search = search end
Public Instance Methods
can_handle?(method)
click to toggle source
# File lib/thinking_sphinx/masks/weight_enumerator_mask.rb, line 6 def can_handle?(method) public_methods(false).include?(method) end
each_with_weight() { |search, row[weight| ... }
click to toggle source
# File lib/thinking_sphinx/masks/weight_enumerator_mask.rb, line 10 def each_with_weight(&block) @search.raw.each_with_index do |row, index| yield @search[index], row[ThinkingSphinx::SphinxQL.weight[:column]] end end