Class: PollAnswer
- Inherits:
-
Object
- Object
- PollAnswer
- Defined in:
- lib/objects/poll_answer.rb
Overview
This object represents an answer of a user in a non-anonymous poll.
Instance Method Summary collapse
-
#initialize(poll) ⇒ PollAnswer
constructor
:nodoc:.
-
#option_ids ⇒ Object
0-based identifiers of answer options, chosen by the user.
-
#poll_id ⇒ Object
Unique poll identifier.
-
#user ⇒ Object
The user, who changed the answer to the poll.
Constructor Details
#initialize(poll) ⇒ PollAnswer
:nodoc:
10 11 12 |
# File 'lib/objects/poll_answer.rb', line 10 def initialize(poll) # :nodoc: @poll = poll end |
Instance Method Details
#option_ids ⇒ Object
0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
26 27 28 |
# File 'lib/objects/poll_answer.rb', line 26 def option_ids @poll.option_ids end |
#poll_id ⇒ Object
Unique poll identifier.
15 16 17 |
# File 'lib/objects/poll_answer.rb', line 15 def poll_id @poll.poll_id end |