Class: Takwimu::Notifications::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/takwimu/notifications/base.rb

Direct Known Subclasses

ActionController, ActiveRecord

Class Method Summary collapse

Class Method Details

.callbackObject



14
15
16
# File 'lib/takwimu/notifications/base.rb', line 14

def self.callback
  raise "#handle not implemented"
end

.subscribe!Object



8
9
10
11
12
# File 'lib/takwimu/notifications/base.rb', line 8

def self.subscribe!
  subscription = ActiveSupport::Notifications.subscribe(event_name, &method(:callback))

  subscription
end