lib/picky/query/allocation.rb in picky-1.1.6 vs lib/picky/query/allocation.rb in picky-1.1.7

- old
+ new

@@ -2,17 +2,17 @@ # An allocation has a number of combinations: # [token, index] [other_token, other_index], ... # class Allocation # :nodoc:all - attr_reader :count, :ids, :score, :combinations, :result_type + attr_reader :count, :ids, :score, :combinations, :result_identifier # # - def initialize combinations, result_type - @combinations = combinations - @result_type = result_type + def initialize combinations, result_identifier + @combinations = combinations + @result_identifier = result_identifier end def hash @combinations.hash end @@ -59,10 +59,10 @@ end # Transform the allocation into result form. # def to_result - [self.result_type, self.score, self.count, @combinations.to_result, self.ids] if self.count > 0 + [self.result_identifier, self.score, self.count, @combinations.to_result, self.ids] if self.count > 0 end # Json representation of this allocation. # # Note: Delegates to to_result. \ No newline at end of file