Module: Snooby::Voting
Instance Method Summary collapse
Instance Method Details
#downvote ⇒ Object
69 70 71 |
# File 'lib/snooby/actions.rb', line 69 def downvote vote -1 end |
#rescind ⇒ Object
65 66 67 |
# File 'lib/snooby/actions.rb', line 65 def rescind vote 0 end |
#upvote ⇒ Object
61 62 63 |
# File 'lib/snooby/actions.rb', line 61 def upvote vote 1 end |
#vote(dir) ⇒ Object
57 58 59 |
# File 'lib/snooby/actions.rb', line 57 def vote(dir) Snooby.request Paths[:vote], :id => self.name, :dir => dir end |