module Recommendations class Item module Ratings def ratings(rating, tolerance = Recommendations.configuration.user_tolerance) Recommendations.redis.zrevrangebyscore("recommendations:ratings:item:#{id}", Float(rating) + tolerance, Float(rating) - tolerance) end end end end