Class: Telegram::Bot::Types::ReplyKeyboardMarkup

Inherits:
Base
  • Object
show all
Defined in:
lib/telegram/bot/types/reply_keyboard_markup.rb

Instance Method Summary collapse

Methods included from PatternMatching

#deconstruct_keys

Methods included from Compactable

#to_json

Instance Method Details

#to_compact_hashObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/telegram/bot/types/reply_keyboard_markup.rb', line 13

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