Module: ExceptionCop

Defined in:
lib/exception_cop.rb,
lib/exception_cop/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.white_listObject

Returns the value of attribute white_list.



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

def white_list
  @white_list
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ExceptionCop)

    the object that the method was called on



7
8
9
10
11
# File 'lib/exception_cop.rb', line 7

def configure
  yield self
  ENV['EXCEPTION_WHITE_LIST'] = white_list.to_s
  override_kernel_raise unless white_list.empty?
end

.resetObject



13
14
15
16
17
# File 'lib/exception_cop.rb', line 13

def reset
  ExceptionCop.configure do |config|
    config.white_list = []
  end
end