Class: PollOption

Inherits:
Object
  • Object
show all
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

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

#textObject

Option text, 1-100 characters.



14
15
16
# File 'lib/objects/poll_option.rb', line 14

def text
  @poll.text
end

#voter_countObject

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