Method: Library::Domain#require
- Defined in:
- lib/library/domain.rb
#require(pathname, options = {}) ⇒ true, false
Require a feature from the library.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/library/domain.rb', line 133 def require(pathname, ={}) if file = $LOAD_CACHE[pathname] if [:load] return file.load else return false end end if feature = Library.find(pathname, ) #file.library_activate $LOAD_CACHE[pathname] = feature return feature.acquire() end # fallback to Ruby's own load mechinisms if [:load] __load__(pathname, [:wrap]) else __require__(pathname) end end |