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

Separate code from doc

parent ee72e807
No related branches found
No related tags found
No related merge requests found
# Use Example
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'])]
Rater.new.sortByRate(items).each { |i| puts i }
OR
Rater.new( # Order of the arguments is important!
positionWeight = 1000,
useWeight = 1,
likeWeight = 100
).sortByRate(items).each { |i| puts i }
......@@ -51,13 +51,3 @@ class BasicRater # Don't instanciate this directly, use Rater
end
end
# Use Example
#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'])]
#Rater.new.sortByRate(items).each { |i| puts i }
#OR
#Rater.new( # Order of the arguments is important!
# positionWeight = 1000,
# useWeight = 1,
# likeWeight = 100
#).sortByRate(items).each { |i| puts i }
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