Method: Jars::Classpath#require

Defined in:
lib/jars/classpath.rb

#require(scope = nil) ⇒ Object


41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/jars/classpath.rb', line 41

def require( scope = nil )
  process( scope ) do |jar|
    if jar.scope == :system
      Kernel.require jar.path
    else
      require_jar( *jar.gacv )
    end
  end
  if scope == nil || scope == :runtime
    process( :provided ) do |jar|
      Jars.mark_as_required( *jar.gacv )
    end
  end
end