Class: MTProto::TL::UpdateShortSentMessage
- Inherits:
-
Object
- Object
- MTProto::TL::UpdateShortSentMessage
- Defined in:
- lib/mtproto/tl/objects/update_short_sent_message.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#pts ⇒ Object
readonly
Returns the value of attribute pts.
-
#pts_count ⇒ Object
readonly
Returns the value of attribute pts_count.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(flags:, id:, pts:, pts_count:, date:) ⇒ UpdateShortSentMessage
constructor
A new instance of UpdateShortSentMessage.
- #out? ⇒ Boolean
Constructor Details
#initialize(flags:, id:, pts:, pts_count:, date:) ⇒ UpdateShortSentMessage
Returns a new instance of UpdateShortSentMessage.
8 9 10 11 12 13 14 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 8 def initialize(flags:, id:, pts:, pts_count:, date:) @flags = flags @id = id @pts = pts @pts_count = pts_count @date = date end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
6 7 8 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 6 def date @date end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
6 7 8 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 6 def flags @flags end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 6 def id @id end |
#pts ⇒ Object (readonly)
Returns the value of attribute pts.
6 7 8 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 6 def pts @pts end |
#pts_count ⇒ Object (readonly)
Returns the value of attribute pts_count.
6 7 8 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 6 def pts_count @pts_count end |
Class Method Details
.deserialize(bytes) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 20 def self.deserialize(bytes) offset = 4 # skip constructor flags = bytes[offset, 4].unpack1('L<') offset += 4 id = bytes[offset, 4].unpack1('l<') offset += 4 pts = bytes[offset, 4].unpack1('l<') offset += 4 pts_count = bytes[offset, 4].unpack1('l<') offset += 4 date = bytes[offset, 4].unpack1('l<') new(flags: flags, id: id, pts: pts, pts_count: pts_count, date: date) end |
Instance Method Details
#out? ⇒ Boolean
16 17 18 |
# File 'lib/mtproto/tl/objects/update_short_sent_message.rb', line 16 def out? flags & (1 << 1) != 0 end |