lib/picky/bundle_realtime.rb in picky-4.0.0pre2 vs lib/picky/bundle_realtime.rb in picky-4.0.0pre3
- old
+ new
@@ -22,11 +22,11 @@
# Since no element uses this sym anymore, we can delete the similarity for it.
# TODO Not really. Since multiple syms can point to the same encoded.
#
@similarity.delete self.similarity_strategy.encoded(str_or_sym)
else
- @weights[str_or_sym] = self.weights_strategy.weight_for ids.size
+ @weights[str_or_sym] = self.weight_strategy.weight_for ids.size
end
end
@realtime.delete id
end
@@ -51,11 +51,11 @@
ids.send where, id
end
# Weights.
#
- @weights[str_or_sym] = self.weights_strategy.weight_for ids.size
+ @weights[str_or_sym] = self.weight_strategy.weight_for ids.size
# Similarity.
#
add_similarity str_or_sym, where
@@ -72,13 +72,9 @@
# Not completely correct, as others will also be affected, but meh.
#
similars.delete str_or_sym if similars.include? str_or_sym
similars << str_or_sym
-
- # Uses the sort order of the strategy.
- #
- self.similarity_strategy.sort similars, str_or_sym
end
end
# Partializes the text and then adds each.
#