Exception: RedisVoteable::Exceptions::AlreadyVotedError
- Inherits:
-
StandardError
- Object
- StandardError
- RedisVoteable::Exceptions::AlreadyVotedError
- Defined in:
- lib/redis_voteable/exceptions.rb
Instance Attribute Summary (collapse)
-
- (Object) up_vote
readonly
Returns the value of attribute up_vote.
Instance Method Summary (collapse)
-
- (AlreadyVotedError) initialize(up_vote)
constructor
A new instance of AlreadyVotedError.
Constructor Details
- (AlreadyVotedError) initialize(up_vote)
A new instance of AlreadyVotedError
6 7 8 9 10 11 12 13 14 |
# File 'lib/redis_voteable/exceptions.rb', line 6 def initialize(up_vote) vote = if up_vote "up voted" else "down voted" end super "The voteable was already #{vote} by the voter." end |
Instance Attribute Details
- (Object) up_vote (readonly)
Returns the value of attribute up_vote
4 5 6 |
# File 'lib/redis_voteable/exceptions.rb', line 4 def up_vote @up_vote end |