Class: PollOption
- Inherits:
-
Object
- Object
- PollOption
- Defined in:
- lib/objects/poll_option.rb
Overview
Monday,
August
24
2020+ EAT
This object contains information about one answer option in a poll.
Instance Method Summary collapse
-
#initialize(poll) ⇒ PollOption
constructor
:nodoc:.
-
#text ⇒ Object
Option
text, 1-100 characters. -
#voter_count ⇒ Object
Number of users that voted for this option.
Constructor Details
#initialize(poll) ⇒ PollOption
:nodoc:
8 9 10 11 |
# File 'lib/objects/poll_option.rb', line 8 def initialize(poll) # :nodoc: @poll = poll freeze end |
Instance Method Details
#text ⇒ Object
Option
text, 1-100 characters.
14 15 16 |
# File 'lib/objects/poll_option.rb', line 14 def text @poll.text end |
#voter_count ⇒ Object
Number of users that voted for this option.
19 20 21 |
# File 'lib/objects/poll_option.rb', line 19 def voter_count @poll.voter_count end |