Class: MobileNotify::Apns::BadgeNotification
- Inherits:
-
Notification
- Object
- Notification
- MobileNotify::Apns::BadgeNotification
- 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, badge_value, sound = nil) ⇒ BadgeNotification
constructor
A new instance of BadgeNotification.
Methods inherited from Notification
Constructor Details
#initialize(device_token, badge_value, sound = nil) ⇒ BadgeNotification
Returns a new instance of BadgeNotification.
49 50 51 52 53 54 |
# File 'lib/mobile_notify/apns/notification.rb', line 49 def initialize(device_token, badge_value, sound = nil) payload = { "aps" => {} } payload["aps"]["badge"] = badge_value.to_i payload["aps"]["sound"] = sound if sound super(device_token, payload) end |