Use Class.new(SuperClass) to define an empty custom error class

This commit is contained in:
Douglas Barbosa Alexandre 2017-04-24 23:41:36 -03:00
parent 30794972f4
commit dd1157c80b

View file

@ -1,6 +1,4 @@
module Github
class Error < StandardError
end
class RepositoryFetchError < Error; end
Error = Class.new(StandardError)
RepositoryFetchError = Class.new(Github::Error)
end