Class: MobileNotify::Apns::AlertNotification
- Inherits:
-
Notification
- Object
- Notification
- MobileNotify::Apns::AlertNotification
- Defined in:
- lib/mobile_notify/apns/notification.rb
Constant Summary
Constants inherited from Notification
Notification::MAX_PAYLOAD_LENGTH
Instance Method Summary collapse
-
#initialize(device_token, alert, sound = nil) ⇒ AlertNotification
constructor
A new instance of AlertNotification.
Methods inherited from Notification
Constructor Details
#initialize(device_token, alert, sound = nil) ⇒ AlertNotification
Returns a new instance of AlertNotification.
40 41 42 43 44 45 |
# File 'lib/mobile_notify/apns/notification.rb', line 40 def initialize(device_token, alert, sound = nil) payload = { "aps" => {} } payload["aps"]["alert"] = alert payload["aps"]["sound"] = sound if sound super(device_token, payload) end |