Exception: MakeVoteable::Exceptions::AlreadyVotedError
- Inherits:
-
StandardError
- Object
- StandardError
- MakeVoteable::Exceptions::AlreadyVotedError
- Defined in:
- lib/make_voteable/exceptions.rb
Instance Attribute Summary collapse
-
#up_vote ⇒ Object
readonly
Returns the value of attribute up_vote.
Instance Method Summary collapse
-
#initialize(up_vote) ⇒ AlreadyVotedError
constructor
A new instance of AlreadyVotedError.
Constructor Details
#initialize(up_vote) ⇒ AlreadyVotedError
Returns a new instance of AlreadyVotedError.
6 7 8 9 10 11 12 13 14 |
# File 'lib/make_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
#up_vote ⇒ Object (readonly)
Returns the value of attribute up_vote.
4 5 6 |
# File 'lib/make_voteable/exceptions.rb', line 4 def up_vote @up_vote end |