class QueryTrack::Notifications::Custom

Attributes

code[R]
duration[R]

Public Class Methods

new(code, duration) click to toggle source
# File lib/query_track/notifications/custom.rb, line 6
def initialize(code, duration)
  @code = code.strip
  @duration = duration
end

Public Instance Methods

call() click to toggle source
# File lib/query_track/notifications/custom.rb, line 11
def call
  return unless QueryTrack::Settings.config.notifications.custom_handler

  trace = QueryTrack::Trace.new(caller).call

  QueryTrack::Settings.config.notifications.custom_handler.call(code, duration, trace)
end