Class: NotifyUser::Houston
- Defined in:
- app/models/notify_user/houston.rb
Constant Summary collapse
- NO_ERROR =
-42- INVALID_TOKEN_ERROR =
8- APN_POOL =
ConnectionPool.new( size: NotifyUser.connection_pool_size, timeout: NotifyUser.connection_pool_timeout) do APNConnection.new end
Constants inherited from Apns
Apns::PAYLOAD_LIMIT, Apns::SYMBOL_NAMES_SIZE
Instance Attribute Summary collapse
-
#push_options ⇒ Object
Returns the value of attribute push_options.
Instance Method Summary collapse
-
#initialize(notification, options) ⇒ Houston
constructor
A new instance of Houston.
- #push ⇒ Object
Constructor Details
#initialize(notification, options) ⇒ Houston
Returns a new instance of Houston.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/notify_user/houston.rb', line 17 def initialize(notification, ) super(notification, ) = device_method = [:device_method] || :devices begin @devices = @notification.target.send(device_method).to_a rescue Rails.logger.info "Notification target, #{@notification.target.class}, does not respond to the method, #{device_method}." end end |
Instance Attribute Details
#push_options ⇒ Object
Returns the value of attribute push_options.
15 16 17 |
# File 'app/models/notify_user/houston.rb', line 15 def end |
Instance Method Details
#push ⇒ Object
30 31 32 |
# File 'app/models/notify_user/houston.rb', line 30 def push send_notifications end |