Class: MTProto::TL::SaveFilePart
- Inherits:
-
Object
- Object
- MTProto::TL::SaveFilePart
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/save_file_part.rb
Instance Method Summary collapse
-
#initialize(file_id:, file_part:, bytes:) ⇒ SaveFilePart
constructor
A new instance of SaveFilePart.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(file_id:, file_part:, bytes:) ⇒ SaveFilePart
Returns a new instance of SaveFilePart.
8 9 10 11 12 |
# File 'lib/mtproto/tl/objects/save_file_part.rb', line 8 def initialize(file_id:, file_part:, bytes:) @file_id = file_id @file_part = file_part @bytes = bytes end |
Instance Method Details
#serialize ⇒ Object
14 15 16 17 18 19 |
# File 'lib/mtproto/tl/objects/save_file_part.rb', line 14 def serialize u32_b(Constructors::UPLOAD_SAVE_FILE_PART) + u64_b(@file_id) + u32_b(@file_part) + serialize_tl_bytes(@bytes) end |