Class: MTProto::TL::UpdatesState
- Inherits:
-
Object
- Object
- MTProto::TL::UpdatesState
- Defined in:
- lib/mtproto/tl/objects/updates_state.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#pts ⇒ Object
Returns the value of attribute pts.
-
#qts ⇒ Object
Returns the value of attribute qts.
-
#seq ⇒ Object
Returns the value of attribute seq.
-
#unread_count ⇒ Object
Returns the value of attribute unread_count.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pts:, qts:, date:, seq:, unread_count:) ⇒ UpdatesState
constructor
A new instance of UpdatesState.
Constructor Details
#initialize(pts:, qts:, date:, seq:, unread_count:) ⇒ UpdatesState
Returns a new instance of UpdatesState.
8 9 10 11 12 13 14 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 8 def initialize(pts:, qts:, date:, seq:, unread_count:) @pts = pts @qts = qts @date = date @seq = seq @unread_count = unread_count end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
6 7 8 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 6 def date @date end |
#pts ⇒ Object
Returns the value of attribute pts.
6 7 8 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 6 def pts @pts end |
#qts ⇒ Object
Returns the value of attribute qts.
6 7 8 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 6 def qts @qts end |
#seq ⇒ Object
Returns the value of attribute seq.
6 7 8 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 6 def seq @seq end |
#unread_count ⇒ Object
Returns the value of attribute unread_count.
6 7 8 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 6 def unread_count @unread_count end |
Class Method Details
.deserialize(data) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/mtproto/tl/objects/updates_state.rb', line 16 def self.deserialize(data) constructor = data[0, 4].unpack1('L<') raise UnexpectedConstructorError, constructor unless constructor == Constructors::UPDATES_STATE offset = 4 pts = data[offset, 4].unpack1('L<') offset += 4 qts = data[offset, 4].unpack1('L<') offset += 4 date = data[offset, 4].unpack1('L<') offset += 4 seq = data[offset, 4].unpack1('L<') offset += 4 unread_count = data[offset, 4].unpack1('L<') new(pts: pts, qts: qts, date: date, seq: seq, unread_count: unread_count) end |