Class: MTProto::TL::ReqPqMulti
- Inherits:
-
Object
- Object
- MTProto::TL::ReqPqMulti
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/req_pq_multi.rb
Instance Attribute Summary collapse
-
#nonce ⇒ Object
readonly
Returns the value of attribute nonce.
Instance Method Summary collapse
-
#initialize(nonce) ⇒ ReqPqMulti
constructor
A new instance of ReqPqMulti.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(nonce) ⇒ ReqPqMulti
Returns a new instance of ReqPqMulti.
10 11 12 13 14 |
# File 'lib/mtproto/tl/objects/req_pq_multi.rb', line 10 def initialize(nonce) raise ArgumentError, 'Nonce must be 16 bytes' unless nonce.bytesize == 16 @nonce = nonce end |
Instance Attribute Details
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
8 9 10 |
# File 'lib/mtproto/tl/objects/req_pq_multi.rb', line 8 def nonce @nonce end |
Instance Method Details
#serialize ⇒ Object
16 17 18 |
# File 'lib/mtproto/tl/objects/req_pq_multi.rb', line 16 def serialize u32_b(Constructors::REQ_PQ_MULTI) + @nonce.bytes end |