Module: Ronin::AutoLoad::ClassMethods
- Defined in:
- lib/ronin/auto_load.rb
Overview
Instance Method Summary collapse
-
#const_missing(name) ⇒ Class, Module
protected
Transparently auto-loads Classes and Modules from their respective files using OpenNamespace.
Instance Method Details
#const_missing(name) ⇒ Class, Module (protected)
Transparently auto-loads Classes and Modules from their respective files using OpenNamespace.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/ronin/auto_load.rb', line 55 def const_missing(name) const = super(name) if Object.const_defined?('DataMapper') # if the loaded Class is a DataMapper Resource, re-finalize if const < DataMapper::Resource DataMapper.finalize end end return const end |