module Aquasync::Callbacks
Has a responsibility to implement format methods to obey AquasyncModel. @see github.com/AQAquamarine/aquasync-protocol/blob/master/aquasync-model.md @author kaiinui
Public Instance Methods
downcase_device_token()
click to toggle source
deviceToken should be lowercase (github.com/AQAquamarine/aquasync-protocol/blob/master/aquasync-model.md#aquasync-model)
# File lib/models/concerns/aquasync_callbacks.rb, line 24 def downcase_device_token self.deviceToken.try(:downcase!) end
downcase_gid()
click to toggle source
gid should be lowercase (github.com/AQAquamarine/aquasync-protocol/blob/master/aquasync-model.md#aquasync-model)
# File lib/models/concerns/aquasync_callbacks.rb, line 19 def downcase_gid self.gid.try(:downcase!) end
set_ust()
click to toggle source
sets UST current UNIX timestamp
# File lib/models/concerns/aquasync_callbacks.rb, line 29 def set_ust self.ust = Time.now.to_i end