lib/picky/internals/query/weights.rb in picky-2.1.2 vs lib/picky/internals/query/weights.rb in picky-2.2.0
- old
+ new
@@ -2,10 +2,12 @@
# Calculates weights for certain combinations.
#
class Weights # :nodoc:all
+ attr_reader :weights
+
#
#
def initialize weights = {}
@weights = weights
end
@@ -42,9 +44,13 @@
# Are there any weights defined?
#
def empty?
@weights.empty?
+ end
+
+ def == other
+ @weights == other.weights
end
# Prints out a nice representation of the configured weights.
#
def to_s
\ No newline at end of file