Class: Passbook::PushNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/passbook/push_notification.rb

Class Method Summary collapse

Class Method Details

.pusherObject



4
5
6
7
8
9
10
# File 'lib/passbook/push_notification.rb', line 4

def pusher
  @pusher ||= Grocer.pusher(
    :certificate => Passbook.notification_cert,
    :passphrase => Passbook.notification_passphrase || "",
    :gateway => Passbook.notification_gateway
  )
end

.send_notification(device_token) ⇒ Object



12
13
14
15
16
# File 'lib/passbook/push_notification.rb', line 12

def send_notification(device_token)
  notification = Grocer::PassbookNotification.new(:device_token => device_token)

  pusher.push notification
end