Sha256: 7d371542476dc29e836bb4bbcf7324f4041ce17067c2f3aceb4c07ac131b7bfd

Contents?: true

Size: 595 Bytes

Versions: 33

Compression:

Stored size: 595 Bytes

Contents

module Telegram
  module Bot
    module Types
      class ReplyKeyboardMarkup < Base
        attribute :keyboard, Array[Array[KeyboardButton]]
        attribute :resize_keyboard, Boolean, default: false
        attribute :one_time_keyboard, Boolean, default: false
        attribute :selective, Boolean, default: false

        def to_compact_hash
          hsh = super
          hsh[:keyboard].map! do |arr|
            arr.map do |item|
              item.is_a?(KeyboardButton) ? item.to_compact_hash : item
            end
          end

          hsh
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
telegram-bot-ruby-0.8.0 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.7.2 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.7.1 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.7.0 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.6.0.2 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.6.0.1 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.3 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.2 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.1 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.0 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.0.beta4 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.0.beta3 lib/telegram/bot/types/reply_keyboard_markup.rb
telegram-bot-ruby-0.5.0.beta2 lib/telegram/bot/types/reply_keyboard_markup.rb