Module: Notifiable

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

Defined Under Namespace

Modules: Generators Classes: App, DeviceToken, Engine, Notification, NotificationStatus, NotifierBase, Railtie

Constant Summary collapse

VERSION =
"0.30.4"
@@delivery_method =
:send
@@save_receipts =
true
@@notification_status_batch_size =
10000
@@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



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

def self.configure
  yield self
end

.notifier_class(notification, device) ⇒ Object



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

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