Class: NotifyUser::Push

Inherits:
Object
  • Object
show all
Defined in:
app/models/notify_user/push.rb

Direct Known Subclasses

Apns, Gcm, UrbanAirship

Constant Summary collapse

SYMBOL_NAMES_SIZE =
10
PAYLOAD_LIMIT =
255

Instance Method Summary collapse

Constructor Details

#initialize(notifications, devices, options) ⇒ Push

Returns a new instance of Push.



6
7
8
9
10
11
12
# File 'app/models/notify_user/push.rb', line 6

def initialize(notifications, devices, options)
  @notifications = notifications
  @notification = notifications.first

  @devices = devices
  @options = options
end

Instance Method Details

#pushObject

Sends push notification:



15
16
17
# File 'app/models/notify_user/push.rb', line 15

def push
  raise "Base APNS class should not be used."
end