Class: MTProto::TL::ReplyInlineMarkup
- Inherits:
-
Object
- Object
- MTProto::TL::ReplyInlineMarkup
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/reply_inline_markup.rb
Constant Summary collapse
- CONSTRUCTOR =
0x48a30254- KEYBOARD_BUTTON_ROW =
0x77608b83
Instance Method Summary collapse
-
#initialize(rows:) ⇒ ReplyInlineMarkup
constructor
rows: array of rows; each row is an array of button objects (each responds to #serialize).
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(rows:) ⇒ ReplyInlineMarkup
rows: array of rows; each row is an array of button objects (each responds to #serialize).
12 13 14 |
# File 'lib/mtproto/tl/objects/reply_inline_markup.rb', line 12 def initialize(rows:) @rows = rows end |
Instance Method Details
#serialize ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/mtproto/tl/objects/reply_inline_markup.rb', line 16 def serialize result = u32_b(CONSTRUCTOR) result += u32_b(Constructors::VECTOR) result += u32_b(@rows.size) @rows.each do |row| result += u32_b(KEYBOARD_BUTTON_ROW) result += u32_b(Constructors::VECTOR) result += u32_b(row.size) row.each { || result += .serialize } end result end |