Class: InlineKeyboardMarkup
- Inherits:
-
Object
- Object
- InlineKeyboardMarkup
- Defined in:
- lib/objects/inlinekeyboardmarkup.rb
Overview
This object represents an inline keyboard that appears right next to the message it belongs to.
Instance Method Summary collapse
-
#initialize(mup) ⇒ InlineKeyboardMarkup
constructor
:nodoc:.
-
#inline_keyboard ⇒ Object
Array of button rows, each represented by an Array of InlineKeyboardButton objects.
Constructor Details
#initialize(mup) ⇒ InlineKeyboardMarkup
:nodoc:
9 10 11 |
# File 'lib/objects/inlinekeyboardmarkup.rb', line 9 def initialize(mup) # :nodoc: @mup = mup end |
Instance Method Details
#inline_keyboard ⇒ Object
Array of button rows, each represented by an Array of InlineKeyboardButton objects.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/objects/inlinekeyboardmarkup.rb', line 15 def inline_keyboard data = @mup.inline_keyboard if data.empty? return false end ary = [] data.each do |e| ary2 = [] e.each do |f| ary2 << InlineKeyboardButton.new(f) end ary << ary2 end ary end |