Class: MTProto::TL::ChannelsLeaveChannel
- Inherits:
-
Object
- Object
- MTProto::TL::ChannelsLeaveChannel
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/channels_leave_channel.rb
Constant Summary collapse
- CONSTRUCTOR =
0xf836aa95
Instance Method Summary collapse
-
#initialize(channel:) ⇒ ChannelsLeaveChannel
constructor
A new instance of ChannelsLeaveChannel.
- #serialize ⇒ Object
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
#serialize ⇒ Object
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 |