Method: JavaClass::Classpath::Factory#classpath
- Defined in:
- lib/javaclass/classpath/factory.rb
#classpath(path, cp = CompositeClasspath.new) ⇒ Object
Parse the given path variable path and return a chain of class path elements. The path variable is separated by : or ; depending on the platform. Adds the classpath to the optional cp element else creates a CompositeClasspath.
17 18 19 20 |
# File 'lib/javaclass/classpath/factory.rb', line 17 def classpath(path, cp=CompositeClasspath.new) path.split(File::PATH_SEPARATOR).each { |cpe| cp.add_file_name(cpe) } cp end |