Module: Notifiable

Defined in:
lib/notifiable.rb,
lib/notifiable/app.rb,
lib/notifiable/user.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, User

Constant Summary collapse

VERSION =
'0.3.5'.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



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

def self.configure
  yield self
end

.notifier_class(notification, device) ⇒ Object



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

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