Module: Notifiable::ClassMethods

Defined in:
lib/notifiable.rb

Instance Method Summary collapse

Instance Method Details

#be_silent_for_exception?(exception) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/notifiable.rb', line 32

def be_silent_for_exception?(exception)
  self.notifiable_silent_exceptions.respond_to?(:any?) && self.notifiable_silent_exceptions.any? {|klass| klass === exception }
end

#exception_data(deliverer = nil) ⇒ Object

set the exception_data deliverer OR retrieve the exception_data



24
25
26
27
28
29
30
# File 'lib/notifiable.rb', line 24

def exception_data(deliverer = nil)
  if deliverer
    write_inheritable_attribute(:exception_data, deliverer)
  else
    read_inheritable_attribute(:exception_data)
  end
end