This repository was archived by the owner on Nov 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Evaluate Models
Nihad Abbasov edited this page Mar 30, 2015
·
5 revisions
add_evaluation(reputation_name, evaluation_value, source)
update_evaluation(reputation_name, evaluation_value, source)
add_or_update_evaluation(reputation_name, evaluation_value, source)add_evaluation raises an exception if the source has already evaluated for the reputation. You can use add_or_update_evaluation to avoid this.
add_or_delete_evaluation(reputation_name, evaluation_value, source)delete_evaluation(reputation_name, source)
delete_evaluation!(reputation_name, source)delete_evaluation returns true or false, while delete_evaluation! raises an exception on failure.
With the following methods, you can increase and decrease evaluation value, instead of add or remove them. They add a new evaluation if it does not exist.
increase_evaluation(reputation_name, value, source)
decrease_evaluation(reputation_name, value, source)You can check if the target record has already been evaluated by a given source:
has_evaluation?(reputation_name, source)You can get evaluation value for the target record by a given source:
evaluation_by(reputation_name, source)It will return nil if the target record hasn't been evaluated by a given source.