diff --git a/lib/ranking/README.md b/lib/ranking/README.md index 5e1767e3c6a950d0b96b218e32c968b5233055b5..a05757ba718552f3b486c31758e3840bd406c53b 100644 --- a/lib/ranking/README.md +++ b/lib/ranking/README.md @@ -1,11 +1,19 @@ # Use Example - +### Input : items = [Item.new("ax",1,1,1,["otherStuffA","lala",'a']),Item.new("bx",2,2,2,[1,2,3,"teste","lblb",'b']),Item.new("cx",1,1,99,[3,2,1,"teste","lclc",'c'])] +### Rank call : + Rater.new.sortByRate(items).each { |i| puts i } -OR + +###### OR + Rater.new( # Order of the arguments is important! positionWeight = 1000, useWeight = 1, likeWeight = 100 ).sortByRate(items).each { |i| puts i } + + +#### Return (output) : + - ordered array of Items, starting from the most ranked to the least \ No newline at end of file