Class: MTProto::TL::UpdateShort

Inherits:
Object
  • Object
show all
Defined in:
lib/mtproto/tl/objects/update_short.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(update, date) ⇒ UpdateShort

Returns a new instance of UpdateShort.



8
9
10
11
# File 'lib/mtproto/tl/objects/update_short.rb', line 8

def initialize(update, date)
  @update = update
  @date = date
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



6
7
8
# File 'lib/mtproto/tl/objects/update_short.rb', line 6

def date
  @date
end

#updateObject (readonly)

Returns the value of attribute update.



6
7
8
# File 'lib/mtproto/tl/objects/update_short.rb', line 6

def update
  @update
end

Class Method Details

.deserialize(bytes) ⇒ Object



13
14
15
16
17
# File 'lib/mtproto/tl/objects/update_short.rb', line 13

def self.deserialize(bytes)
  date = bytes[-4, 4].unpack1('l<')
  update = Update.deserialize(bytes[4...-4])
  new(update, date)
end