Class: UniformNotifier::Raise

Inherits:
Base
  • Object
show all
Defined in:
lib/uniform_notifier/raise.rb

Defined Under Namespace

Classes: UniformNotifierException

Class Method Summary collapse

Methods inherited from Base

inline_notify, wrap_js_association

Class Method Details

.active?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/uniform_notifier/raise.rb', line 5

def self.active?
  @exception_class
end

.out_of_channel_notify(message) ⇒ Object

Raises:

  • (@exception_class)


9
10
11
12
13
# File 'lib/uniform_notifier/raise.rb', line 9

def self.out_of_channel_notify( message )
  return unless self.active?

  raise @exception_class, message
end

.setup_connection(exception_class) ⇒ Object



15
16
17
# File 'lib/uniform_notifier/raise.rb', line 15

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