class Telegram::Bot::Types::InlineKeyboardMarkup
Attributes
inline_keyboard[RW]
Public Class Methods
new(attributes)
click to toggle source
# File lib/telegram/bot/types/inline_keyboard_markup.rb, line 5 def initialize(attributes) @inline_keyboard = attributes.map do |v| v.map do |b| if b.is_a?(InlineKeyboardButton) b elsif b.is_a?(Hash) InlineKeyboardButton.new(b) else raise Telegram::Bot::KeyboardMarkupError.new( 'Attributes must be Array of Array of Telegram::Bot::Types::InlineKeyboardButton or Hash' ) end end end end