Class: ActsAsPushable::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/acts_as_pushable/notification.rb

Direct Known Subclasses

APN::Notification, GCM::Notification

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device:, message:, **options) ⇒ Notification

Returns a new instance of Notification.



3
4
5
6
7
# File 'lib/acts_as_pushable/notification.rb', line 3

def initialize(device:, message:, **options)
  @device  = device
  @message = message
  @options = options
end

Class Method Details

.send(device:, message:, **options) ⇒ Object



9
10
11
# File 'lib/acts_as_pushable/notification.rb', line 9

def self.send(device:, message:, **options)
  self.new(device: device, message: message, **options).perform
end