Exception: Ptero::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- Ptero::Exception
- Defined in:
- lib/ptero/exception.rb
Overview
The superclass of Ptero-related Exceptions
Direct Known Subclasses
Defined Under Namespace
Classes: ApplicationException, GeneratorException
Class Method Summary collapse
-
.const_missing(const_name) ⇒ Object
Autoload exceptions.
Class Method Details
.const_missing(const_name) ⇒ Object
Autoload exceptions
14 15 16 17 18 19 20 21 22 |
# File 'lib/ptero/exception.rb', line 14 def const_missing(const_name) # Require the exception require "#{__dir__}/exceptions/#{const_name.downcase}.rb" return const_get const_name if const_defined? const_name super # If we couldn't load the file, throw an error rescue LoadError super end |