Module: Redd::Objects::Thing::Votable
- Included in:
- Comment, Submission
- Defined in:
- lib/redd/objects/thing/votable.rb
Overview
Things that can be voted upon.
Instance Method Summary collapse
-
#clear_vote ⇒ Object
(also: #unvote)
Remove your vote on the thing.
-
#downvote ⇒ Object
Downvote the thing.
-
#upvote ⇒ Object
Upvote the thing.
Instance Method Details
#clear_vote ⇒ Object Also known as: unvote
Remove your vote on the thing.
17 18 19 |
# File 'lib/redd/objects/thing/votable.rb', line 17 def clear_vote vote(0) end |
#downvote ⇒ Object
Downvote the thing.
12 13 14 |
# File 'lib/redd/objects/thing/votable.rb', line 12 def downvote vote(-1) end |
#upvote ⇒ Object
Upvote the thing.
7 8 9 |
# File 'lib/redd/objects/thing/votable.rb', line 7 def upvote vote(1) end |