Class: ExceptionList::Exceptions

Inherits:
Object
  • Object
show all
Defined in:
lib/exception_list/exceptions.rb

Instance Method Summary collapse

Instance Method Details

#allObject



3
4
5
6
7
8
9
# File 'lib/exception_list/exceptions.rb', line 3

def all
  exceptions = []
  ObjectSpace.each_object(Class) do |o|
    exceptions << o if o.ancestors.include?(Exception)
  end
  exceptions
end