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, options={})
  return unless apply?(file, options)

  LOCATIONS.each do |site|
    if path = lookup(site, file, options)
      return super(path, options)
    end
  end

  raise_load_error(file)
end