Sha256: ce73bfae13efcb99a0f7d51a7698a80a0e9af1fe34e23c758c23add0f0eaa230

Contents?: true

Size: 879 Bytes

Versions: 2

Compression:

Stored size: 879 Bytes

Contents

# frozen_string_literal: true

module Telegram
  module Bot
    module Types
      class Poll < Base
        attribute :id, Types::String
        attribute :question, Types::String.constrained(min_size: 1, max_size: 300)
        attribute? :question_entities, Types::Array.of(MessageEntity)
        attribute :options, Types::Array.of(PollOption)
        attribute :total_voter_count, Types::Integer
        attribute :is_closed, Types::Bool
        attribute :is_anonymous, Types::Bool
        attribute :type, Types::String
        attribute :allows_multiple_answers, Types::Bool
        attribute? :correct_option_id, Types::Integer
        attribute? :explanation, Types::String
        attribute? :explanation_entities, Types::Array.of(MessageEntity)
        attribute? :open_period, Types::Integer
        attribute? :close_date, Types::Integer
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
telegram-bot-ruby-2.2.0 lib/telegram/bot/types/poll.rb
telegram-bot-ruby-2.1.0 lib/telegram/bot/types/poll.rb