class ActsAsPushable::APN::Notification
Public Instance Methods
perform()
click to toggle source
# File lib/acts_as_pushable/apn/notification.rb, line 6 def perform client.push(notification) end
Private Instance Methods
certificate()
click to toggle source
# File lib/acts_as_pushable/apn/notification.rb, line 18 def certificate ActsAsPushable.configuration.send("apn_#{environment}_certificate_file") end
client()
click to toggle source
# File lib/acts_as_pushable/apn/notification.rb, line 12 def client client = Houston::Client.send(environment) client.certificate = certificate client end
content_available()
click to toggle source
# File lib/acts_as_pushable/apn/notification.rb, line 22 def content_available options.delete(:content_available) || true end
count()
click to toggle source
# File lib/acts_as_pushable/apn/notification.rb, line 26 def count options.delete(:count) end
notification()
click to toggle source
# File lib/acts_as_pushable/apn/notification.rb, line 30 def notification notification = Houston::Notification.new(device: device.token) notification.alert = message notification.badge = count notification.content_available = content_available notification.custom_data = payload notification end