Sha256: 620bac7d661b1ead1f755c040ac7297467f6f2b3710c6e6ce359bf6c39360772

Contents?: true

Size: 460 Bytes

Versions: 2

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

class UniformNotifier
  class Raise < Base
    def self.active?
      defined?(@exception_class) ? @exception_class : false
    end

    def self.setup_connection(exception_class)
      @exception_class = exception_class == true ? Exception : exception_class
    end

    protected

    def self._out_of_channel_notify(data)
      message = data.values.compact.join("\n")

      raise @exception_class, message
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uniform_notifier-1.14.0 lib/uniform_notifier/raise.rb
uniform_notifier-1.13.2 lib/uniform_notifier/raise.rb