app/services/slack_notifier.rb
# Primary instance method which will trigger a Slack notification
# rubocop:disable Metrics/MethodLength
Primary instance method which will trigger a Slack notification
rubocop:disable Metrics/MethodLength
Primary instance method which will trigger a Slack notification rubocop : disable Metrics / MethodLength
def call
    return unless Rails.application.config.send_slack_notifications
    if slack_webhook_url.nil?
      Rails.logger.tagged('slack', 'configuration') do
        Rails.logger.info 'No SLACK_WEBHOOK_URL environment variable present'
      end
      return
    end
    Rails.logger.tagged('slack', 'notification') do
      Rails.logger.info "Notifying Slack Channel for: #{employee_name} with url #{employee_rec_url} "
    end
    notify_slack
  end
def call return unless Rails . application . config . send_slack_notifications if slack_webhook_url . nil? Rails . logger . tagged ( 'slack' , 'configuration' ) do Rails . logger . info 'No SLACK_WEBHOOK_URL environment variable present' end return end Rails . logger . tagged ( 'slack' , 'notification' ) do Rails . logger . info "Notifying Slack Channel for: #{employee_name} with url #{employee_rec_url} " end notify_slack end
Primary instance method which will trigger a Slack notification
rubocop:disable Metrics/MethodLength
Primary instance method which will trigger a Slack notification rubocop : disable Metrics / MethodLength