Class: Telegram::Bot::Types::PollOption

Inherits:
Base
  • Object
show all
Defined in:
sig/telegram/bot/types/poll_option.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

#added_by_chatChat? (readonly)

Returns the value of attribute added_by_chat.

Returns:



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

def added_by_chat
  @added_by_chat
end

#added_by_userUser? (readonly)

Returns the value of attribute added_by_user.

Returns:



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

def added_by_user
  @added_by_user
end

#addition_dateInteger? (readonly)

Returns the value of attribute addition_date.

Returns:

  • (Integer, nil)


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

def addition_date
  @addition_date
end

#persistent_idString (readonly)

Returns the value of attribute persistent_id.

Returns:

  • (String)


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

def persistent_id
  @persistent_id
end

#textString (readonly)

Returns the value of attribute text.

Returns:

  • (String)


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

def text
  @text
end

#text_entitiesArray[MessageEntity]? (readonly)

Returns the value of attribute text_entities.

Returns:



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

def text_entities
  @text_entities
end

#voter_countInteger (readonly)

Returns the value of attribute voter_count.

Returns:

  • (Integer)


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

def voter_count
  @voter_count
end

Class Method Details

.new(persistent_id:, text:, text_entities:, voter_count:, added_by_user:, added_by_chat:, addition_date:) ⇒ instance .new(attributes) ⇒ instance

Overloads:

  • .new(persistent_id:, text:, text_entities:, voter_count:, added_by_user:, added_by_chat:, addition_date:) ⇒ instance

    Parameters:

    • persistent_id: (String)
    • text: (String)
    • text_entities: (Array[MessageEntity])
    • voter_count: (Integer)
    • added_by_user: (User)
    • added_by_chat: (Chat)
    • addition_date: (Integer)

    Returns:

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

    Parameters:

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

    Returns:

    • (instance)


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

def self.new: (persistent_id: String, text: String, ?text_entities: Array[MessageEntity], voter_count: Integer, ?added_by_user: User, ?added_by_chat: Chat, ?addition_date: Integer) -> instance
| (?Hash[Symbol | String, untyped] attributes) -> instance