Class: WeightedListRank::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/weighted_list_rank/strategy.rb

Instance Method Summary collapse

Instance Method Details

#calculate_score(list, item) ⇒ Numeric

Calculates the score for an item within a list. Must be implemented by subclass.

Parameters:

  • list (List)

    the list containing the item.

  • item (Item)

    the item to calculate the score for.

Returns:

  • (Numeric)

    the calculated score for the item.

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/weighted_list_rank/strategy.rb', line 7

def calculate_score(list, item)
  raise NotImplementedError
end