Class: TD::Types::Poll

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

Overview

Describes a poll.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#close_dateInteger

Point in time (Unix timestamp) when the poll will be automatically closed.

Returns:

  • (Integer)

    the current value of close_date



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def close_date
  @close_date
end

#idInteger

Unique poll identifier.

Returns:

  • (Integer)

    the current value of id



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def id
  @id
end

#is_anonymousBoolean

True, if the poll is anonymous.

Returns:

  • (Boolean)

    the current value of is_anonymous



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def is_anonymous
  @is_anonymous
end

#is_closedBoolean

True, if the poll is closed.

Returns:

  • (Boolean)

    the current value of is_closed



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def is_closed
  @is_closed
end

#open_periodInteger

Amount of time the poll will be active after creation, in seconds.

Returns:

  • (Integer)

    the current value of open_period



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def open_period
  @open_period
end

#optionsArray<TD::Types::PollOption>

List of poll answer options.

Returns:



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def options
  @options
end

#questionTD::Types::String

Poll question; 1-300 characters.

Returns:

  • (TD::Types::String)

    the current value of question



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def question
  @question
end

#recent_voter_user_idsArray<Integer>

User identifiers of recent voters, if the poll is non-anonymous.

Returns:

  • (Array<Integer>)

    the current value of recent_voter_user_ids



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def recent_voter_user_ids
  @recent_voter_user_ids
end

#total_voter_countInteger

Total number of voters, participating in the poll.

Returns:

  • (Integer)

    the current value of total_voter_count



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def total_voter_count
  @total_voter_count
end

#typeTD::Types::PollType

Type of the poll.

Returns:



14
15
16
# File 'lib/tdlib/types/poll.rb', line 14

def type
  @type
end