Module: Madmin::Resources

Defined in:
lib/madmin/resources.rb

Class Method Summary collapse

Class Method Details

.gatherObject

TODO: link to documentation in error message.



4
5
6
7
8
9
10
11
# File 'lib/madmin/resources.rb', line 4

def self.gather
  all
rescue NoMethodError
  raise NoResourcesError,
    "You must define an array of resources as `self.all` in lib/madmin/resources.rb"
rescue NameError => e
  raise ResourceNotFoundError, "Madmin cannot locate the resource #{e.name}."
end