Module: Notifiable

Defined in:
lib/notifiable.rb,
lib/notifiable/app.rb,
lib/notifiable/engine.rb,
lib/notifiable/version.rb,
lib/notifiable/device_token.rb,
lib/notifiable/notification.rb,
lib/notifiable/notifier_base.rb,
lib/notifiable/notification_status.rb

Defined Under Namespace

Classes: App, DeviceToken, Engine, Notification, NotificationStatus, NotifierBase

Constant Summary collapse

VERSION =
'0.2.2'.freeze
@@delivery_method =
:send
@@save_receipts =
true
@@notification_status_batch_size =
10_000
@@notifier_classes =
{}
@@find_notifier_class_proc =
nil

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Notifiable)

    the object that the method was called on



28
29
30
# File 'lib/notifiable.rb', line 28

def self.configure
  yield self
end

.notifier_class(notification, device) ⇒ Object



32
33
34
# File 'lib/notifiable.rb', line 32

def self.notifier_class(notification, device)
  Notifiable.find_notifier_class_proc ? Notifiable.find_notifier_class_proc.call(notification, device) : Notifiable.notifier_classes[device.provider.to_sym]
end