Method: Loadable::RubyLoader#call
- Defined in:
- lib/loadable/loaders/ruby_loader.rb
#call(file, options = {}) ⇒ Object
Load the the first standard Ruby library matching file.
Returns nil if this loader is not applicable, which is determined by the use of ‘:from => ’ruby’‘ option.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/loadable/loaders/ruby_loader.rb', line 32 def call(file, ={}) return unless apply?(file, ) LOCATIONS.each do |site| if path = lookup(site, file, ) return super(path, ) end end raise_load_error(file) end |