Class: Telegram::Bot::Types::Base
- Inherits:
-
Object
- Object
- Telegram::Bot::Types::Base
- Defined in:
- lib/telegram/bot/types/base.rb
Direct Known Subclasses
Audio, CallbackQuery, Chat, ChosenInlineResult, Contact, Document, File, ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, InlineQuery, InlineQueryResultArticle, InlineQueryResultAudio, InlineQueryResultCachedAudio, InlineQueryResultCachedDocument, InlineQueryResultCachedGif, InlineQueryResultCachedMpeg4Gif, InlineQueryResultCachedPhoto, InlineQueryResultCachedSticker, InlineQueryResultCachedVideo, InlineQueryResultCachedVoice, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultGif, InlineQueryResultLocation, InlineQueryResultMpeg4Gif, InlineQueryResultPhoto, InlineQueryResultVenue, InlineQueryResultVideo, InlineQueryResultVoice, InputMessageContent, KeyboardButton, Location, Message, MessageEntity, PhotoSize, ReplyKeyboardHide, ReplyKeyboardMarkup, Sticker, Update, User, Venue, Video, Voice
Instance Method Summary collapse
Instance Method Details
#to_compact_hash ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/telegram/bot/types/base.rb', line 7 def to_compact_hash Hash[attributes.dup.delete_if { |_, v| v.nil? }.map do |key, value| value = if value.class.ancestors.include?(Telegram::Bot::Types::Base) value.to_compact_hash else value end [key, value] end] end |