Class: ActsAsVotable::Helpers::VotableWords
- Inherits:
-
Object
- Object
- ActsAsVotable::Helpers::VotableWords
- Defined in:
- lib/acts_as_votable/helpers/words.rb
Class Method Summary collapse
-
.meaning_of(word) ⇒ Object
check is word is a true or bad vote if the word is unknown, then it counts it as a true/good vote.
- .that_mean_false ⇒ Object
- .that_mean_true ⇒ Object
Class Method Details
.meaning_of(word) ⇒ Object
check is word is a true or bad vote if the word is unknown, then it counts it as a true/good vote. this exists to allow all voting to be good by default
31 32 33 |
# File 'lib/acts_as_votable/helpers/words.rb', line 31 def self.meaning_of word !that_mean_false.include?(word) end |
.that_mean_false ⇒ Object
24 25 26 |
# File 'lib/acts_as_votable/helpers/words.rb', line 24 def self.that_mean_false ['down', 'downvote', 'dislike', 'disliked', 'negative', 'no', 'bad', 'false', 0, false] end |
.that_mean_true ⇒ Object
20 21 22 |
# File 'lib/acts_as_votable/helpers/words.rb', line 20 def self.that_mean_true ['up', 'upvote', 'like', 'liked', 'positive', 'yes', 'good', 'true', 1, true] end |