Module: WeightedListRank::List
- Defined in:
- lib/weighted_list_rank/list.rb
Instance Method Summary collapse
-
#id ⇒ Integer, String
Returns the unique identifier of the list.
-
#items ⇒ Enumerable<Item>
Returns an enumerable collection of items in the list.
-
#weight ⇒ Numeric
Returns the weight of the list.
Instance Method Details
#id ⇒ Integer, String
Returns the unique identifier of the list. Must be implemented by including class.
17 18 19 |
# File 'lib/weighted_list_rank/list.rb', line 17 def id raise NotImplementedError, "Implement this method to return the unique identifier of a list" end |
#items ⇒ Enumerable<Item>
Returns an enumerable collection of items in the list. Must be implemented by including class.
11 12 13 |
# File 'lib/weighted_list_rank/list.rb', line 11 def items raise NotImplementedError, "Implement this method to return the enumerable collection of items" end |
#weight ⇒ Numeric
Returns the weight of the list. Must be implemented by including class.
5 6 7 |
# File 'lib/weighted_list_rank/list.rb', line 5 def weight raise NotImplementedError, "Implement this method to return the list's weight" end |