Methods
Instance Public methods
downvotes()
Link
Return the number of -1 comments (downvotes)
Source: show
# File app/roles/votes.rb, line 16 def downvotes notes.select(&:downvote?).size end
downvotes_in_percent()
Link
Source: show
# File app/roles/votes.rb, line 20 def downvotes_in_percent if votes_count.zero? 0 else 100.0 - upvotes_in_percent end end
upvotes()
Link
Return the number of +1 comments (upvotes)
Source: show
# File app/roles/votes.rb, line 3 def upvotes notes.select(&:upvote?).size end