Class: Vitals::Integrations::Notifications::Base
- Inherits:
-
Object
- Object
- Vitals::Integrations::Notifications::Base
show all
- Defined in:
- lib/vitals/integrations/notifications/base.rb
Class Method Summary
collapse
Class Method Details
.duration(started, finished) ⇒ Object
15
16
17
|
# File 'lib/vitals/integrations/notifications/base.rb', line 15
def self.duration(started, finished)
Vitals::Utils.sec_to_ms(finished - started)
end
|
.handle ⇒ Object
11
12
13
|
# File 'lib/vitals/integrations/notifications/base.rb', line 11
def self.handle
raise "#handle not implemented"
end
|
.subscribe! ⇒ Object
5
6
7
8
9
|
# File 'lib/vitals/integrations/notifications/base.rb', line 5
def self.subscribe!
subscriber = ActiveSupport::Notifications.subscribe(event_name, &method(:handle))
subscriber
end
|