Class: MTProto::TL::ChannelsLeaveChannel

Inherits:
Object
  • Object
show all
Includes:
Binary
Defined in:
lib/mtproto/tl/objects/channels_leave_channel.rb

Constant Summary collapse

CONSTRUCTOR =
0xf836aa95

Instance Method Summary collapse

Methods included from Binary

#b_u32, #b_u64, #u32_b, #u64_b

Constructor Details

#initialize(channel:) ⇒ ChannelsLeaveChannel

Returns a new instance of ChannelsLeaveChannel.



10
11
12
# File 'lib/mtproto/tl/objects/channels_leave_channel.rb', line 10

def initialize(channel:)
  @channel = channel
end

Instance Method Details

#serializeObject



14
15
16
17
18
19
# File 'lib/mtproto/tl/objects/channels_leave_channel.rb', line 14

def serialize
  u32_b(CONSTRUCTOR) +
    u32_b(Constructors::INPUT_CHANNEL) +
    u64_b(@channel[:id]) +
    u64_b(@channel[:access_hash])
end