Skip to content
Snippets Groups Projects
Commit 78e68089 authored by Lior Spach's avatar Lior Spach
Browse files

Merge branch 'ranking' of gitlab.c3sl.ufpr.br:portalmec/portalmec into ranking

parents e35a0044 2ece9bf1
No related branches found
No related tags found
No related merge requests found
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment