Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/rdf/threadsafe/module.rb
Instance Method Summary collapse
-
#rdf_autoload(sym, path) ⇒ Object
(also: #autoload)
For any autoload call from a caller in the RDF module namespace, use require instead.
-
#regular_autoload ⇒ Object
Take Module#autoload, unbind it and rebind it as #regular_autoload.
Instance Method Details
#rdf_autoload(sym, path) ⇒ Object Also known as: autoload
For any autoload call from a caller in the RDF module namespace, use require instead. All other callers use the normal autoload
11 12 13 14 15 16 17 |
# File 'lib/rdf/threadsafe/module.rb', line 11 def rdf_autoload(sym, path) if self.name =~ /^RDF(\:\:|$)/ require path else regular_autoload(sym, path) end end |
#regular_autoload ⇒ Object
Take Module#autoload, unbind it and rebind it as #regular_autoload
5 |
# File 'lib/rdf/threadsafe/module.rb', line 5 define_method(:regular_autoload, self.instance_method(:autoload).unbind) |