Sha256: d412c5afc2274582021958d41f3b9287826a1f8e273a91c913679e03bfb770f7

Contents?: true

Size: 446 Bytes

Versions: 34

Compression:

Stored size: 446 Bytes

Contents

module Telegram
  module Bot
    module Types
      class InlineKeyboardMarkup < Base
        attribute :inline_keyboard, Array[Array[InlineKeyboardButton]]

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

          hsh
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

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