Class: TD::Types::PollType::Quiz

Inherits:
TD::Types::PollType show all
Defined in:
lib/tdlib/types/poll_type/quiz.rb

Overview

A poll in quiz mode, which has exactly one correct answer option and can be answered only once.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#correct_option_idInteger

0-based identifier of the correct answer option; -1 for a yet unanswered poll.

Returns:

  • (Integer)

    the current value of correct_option_id



7
8
9
# File 'lib/tdlib/types/poll_type/quiz.rb', line 7

def correct_option_id
  @correct_option_id
end

#explanationTD::Types::FormattedText?

Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll.

Returns:



7
8
9
# File 'lib/tdlib/types/poll_type/quiz.rb', line 7

def explanation
  @explanation
end