Method: APNS::Notification#initialize
- Defined in:
- lib/pushmeup/apns/notification.rb
#initialize(device_token, message) ⇒ Notification
Returns a new instance of Notification.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pushmeup/apns/notification.rb', line 5 def initialize(device_token, ) self.device_token = device_token if .is_a?(Hash) self.alert = [:alert] self.badge = [:badge] self.sound = [:sound] self.other = [:other] elsif .is_a?(String) self.alert = else raise "Notification needs to have either a Hash or String" end end |