Class: Telegram::Bot::Types::Poll

Inherits:
Base
  • Object
show all
Defined in:
sig/telegram/bot/types/poll.rbs

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Class Method Summary collapse

Methods included from Compactable

#to_compact_hash, #to_json

Methods included from PatternMatching

#deconstruct_keys

Instance Attribute Details

#allows_multiple_answersBoolean (readonly)

Returns the value of attribute allows_multiple_answers.

Returns:

  • (Boolean)


16
17
18
# File 'sig/telegram/bot/types/poll.rbs', line 16

def allows_multiple_answers
  @allows_multiple_answers
end

#allows_revotingBoolean (readonly)

Returns the value of attribute allows_revoting.

Returns:

  • (Boolean)


17
18
19
# File 'sig/telegram/bot/types/poll.rbs', line 17

def allows_revoting
  @allows_revoting
end

#close_dateInteger? (readonly)

Returns the value of attribute close_date.

Returns:

  • (Integer, nil)


22
23
24
# File 'sig/telegram/bot/types/poll.rbs', line 22

def close_date
  @close_date
end

#correct_option_idsArray[Integer]? (readonly)

Returns the value of attribute correct_option_ids.

Returns:

  • (Array[Integer], nil)


18
19
20
# File 'sig/telegram/bot/types/poll.rbs', line 18

def correct_option_ids
  @correct_option_ids
end

#descriptionString? (readonly)

Returns the value of attribute description.

Returns:

  • (String, nil)


23
24
25
# File 'sig/telegram/bot/types/poll.rbs', line 23

def description
  @description
end

#description_entitiesArray[MessageEntity]? (readonly)

Returns the value of attribute description_entities.

Returns:



24
25
26
# File 'sig/telegram/bot/types/poll.rbs', line 24

def description_entities
  @description_entities
end

#explanationString? (readonly)

Returns the value of attribute explanation.

Returns:

  • (String, nil)


19
20
21
# File 'sig/telegram/bot/types/poll.rbs', line 19

def explanation
  @explanation
end

#explanation_entitiesArray[MessageEntity]? (readonly)

Returns the value of attribute explanation_entities.

Returns:



20
21
22
# File 'sig/telegram/bot/types/poll.rbs', line 20

def explanation_entities
  @explanation_entities
end

#idString (readonly)

Returns the value of attribute id.

Returns:

  • (String)


8
9
10
# File 'sig/telegram/bot/types/poll.rbs', line 8

def id
  @id
end

#is_anonymousBoolean (readonly)

Returns the value of attribute is_anonymous.

Returns:

  • (Boolean)


14
15
16
# File 'sig/telegram/bot/types/poll.rbs', line 14

def is_anonymous
  @is_anonymous
end

#is_closedBoolean (readonly)

Returns the value of attribute is_closed.

Returns:

  • (Boolean)


13
14
15
# File 'sig/telegram/bot/types/poll.rbs', line 13

def is_closed
  @is_closed
end

#open_periodInteger? (readonly)

Returns the value of attribute open_period.

Returns:

  • (Integer, nil)


21
22
23
# File 'sig/telegram/bot/types/poll.rbs', line 21

def open_period
  @open_period
end

#optionsArray[PollOption] (readonly)

Returns the value of attribute options.

Returns:



11
12
13
# File 'sig/telegram/bot/types/poll.rbs', line 11

def options
  @options
end

#questionString (readonly)

Returns the value of attribute question.

Returns:

  • (String)


9
10
11
# File 'sig/telegram/bot/types/poll.rbs', line 9

def question
  @question
end

#question_entitiesArray[MessageEntity]? (readonly)

Returns the value of attribute question_entities.

Returns:



10
11
12
# File 'sig/telegram/bot/types/poll.rbs', line 10

def question_entities
  @question_entities
end

#total_voter_countInteger (readonly)

Returns the value of attribute total_voter_count.

Returns:

  • (Integer)


12
13
14
# File 'sig/telegram/bot/types/poll.rbs', line 12

def total_voter_count
  @total_voter_count
end

#typeString (readonly)

Returns the value of attribute type.

Returns:

  • (String)


15
16
17
# File 'sig/telegram/bot/types/poll.rbs', line 15

def type
  @type
end

Class Method Details

.new(id:, question:, question_entities:, options:, total_voter_count:, is_closed:, is_anonymous:, type:, allows_multiple_answers:, allows_revoting:, correct_option_ids:, explanation:, explanation_entities:, open_period:, close_date:, description:, description_entities:) ⇒ instance .new(attributes) ⇒ instance

Overloads:

  • .new(id:, question:, question_entities:, options:, total_voter_count:, is_closed:, is_anonymous:, type:, allows_multiple_answers:, allows_revoting:, correct_option_ids:, explanation:, explanation_entities:, open_period:, close_date:, description:, description_entities:) ⇒ instance

    Parameters:

    • id: (String)
    • question: (String)
    • question_entities: (Array[MessageEntity])
    • options: (Array[PollOption])
    • total_voter_count: (Integer)
    • is_closed: (Boolean)
    • is_anonymous: (Boolean)
    • type: (String)
    • allows_multiple_answers: (Boolean)
    • allows_revoting: (Boolean)
    • correct_option_ids: (Array[Integer])
    • explanation: (String)
    • explanation_entities: (Array[MessageEntity])
    • open_period: (Integer)
    • close_date: (Integer)
    • description: (String)
    • description_entities: (Array[MessageEntity])

    Returns:

    • (instance)
  • .new(attributes) ⇒ instance

    Parameters:

    • attributes (Hash[Symbol | String, untyped])

    Returns:

    • (instance)


6
7
# File 'sig/telegram/bot/types/poll.rbs', line 6

def self.new: (id: String, question: String, ?question_entities: Array[MessageEntity], options: Array[PollOption], total_voter_count: Integer, is_closed: bool, is_anonymous: bool, type: String, allows_multiple_answers: bool, allows_revoting: bool, ?correct_option_ids: Array[Integer], ?explanation: String, ?explanation_entities: Array[MessageEntity], ?open_period: Integer, ?close_date: Integer, ?description: String, ?description_entities: Array[MessageEntity]) -> instance
| (?Hash[Symbol | String, untyped] attributes) -> instance