Module: JavaGems::Jam

Defined in:
lib/javagems/jam.rb

Class Method Summary collapse

Class Method Details

.classpath_from_options(options) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/javagems/jam.rb', line 3

def self.classpath_from_options(options)
  classpath = [ENV["CLASSPATH"]]
  classpath += %w[-cp -classpath].map do |option|
    idx = options.index(option)
    options.slice!(idx..(idx + 1)).last if idx
  end
  [classpath.compact.join(File::PATH_SEPARATOR), options]
end