Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/truck/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#const_missing(const) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/truck/core_ext.rb', line 2 def const_missing(const) catch :const do Truck::Autoloader.handle const, from: self end rescue NameError => name_error if name_error.class == NameError # Reraise the error to keep our junk out of the backtrace raise NameError, name_error. else # NoMethodError inherits from NameError raise name_error end end |