Class: TD::Types::PollOption

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/poll_option.rb

Overview

Describes one answer option of a poll.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#is_being_chosenBoolean

True, if the option is being chosen by a pending setPollAnswer request.

Returns:

  • (Boolean)

    the current value of is_being_chosen



9
10
11
# File 'lib/tdlib/types/poll_option.rb', line 9

def is_being_chosen
  @is_being_chosen
end

#is_chosenBoolean

True, if the option was chosen by the user.

Returns:

  • (Boolean)

    the current value of is_chosen



9
10
11
# File 'lib/tdlib/types/poll_option.rb', line 9

def is_chosen
  @is_chosen
end

#textTD::Types::String

Option text; 1-100 characters.

Returns:

  • (TD::Types::String)

    the current value of text



9
10
11
# File 'lib/tdlib/types/poll_option.rb', line 9

def text
  @text
end

#vote_percentageInteger

The percentage of votes for this option; 0-100.

Returns:

  • (Integer)

    the current value of vote_percentage



9
10
11
# File 'lib/tdlib/types/poll_option.rb', line 9

def vote_percentage
  @vote_percentage
end

#voter_countInteger

Number of voters for this option, available only for closed or voted polls.

Returns:

  • (Integer)

    the current value of voter_count



9
10
11
# File 'lib/tdlib/types/poll_option.rb', line 9

def voter_count
  @voter_count
end