Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/rdf/threadsafe/module.rb

Instance Method Summary collapse

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_autoloadObject

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)