Class: NotifyUser::Apns
Constant Summary collapse
- NO_ERROR =
-42
- INVALID_TOKEN_ERROR =
8
Constants inherited from Push
Push::PAYLOAD_LIMIT, Push::SYMBOL_NAMES_SIZE
Instance Attribute Summary collapse
-
#apn_connection ⇒ Object
Returns the value of attribute apn_connection.
-
#push_options ⇒ Object
Returns the value of attribute push_options.
Instance Method Summary collapse
-
#initialize(notifications, devices, options) ⇒ Apns
constructor
A new instance of Apns.
- #push ⇒ Object
Constructor Details
#initialize(notifications, devices, options) ⇒ Apns
Returns a new instance of Apns.
11 12 13 14 15 16 |
# File 'app/models/notify_user/apns.rb', line 11 def initialize(notifications, devices, ) super(notifications, devices, ) @push_options = @devices = devices end |
Instance Attribute Details
#apn_connection ⇒ Object
Returns the value of attribute apn_connection.
9 10 11 |
# File 'app/models/notify_user/apns.rb', line 9 def apn_connection @apn_connection end |
#push_options ⇒ Object
Returns the value of attribute push_options.
9 10 11 |
# File 'app/models/notify_user/apns.rb', line 9 def @push_options end |
Instance Method Details
#push ⇒ Object
18 19 20 21 22 23 |
# File 'app/models/notify_user/apns.rb', line 18 def push APNConnection::POOL.with do |apn_conn| @apn_connection = apn_conn send_notifications end end |