Class: Java::Classpath
- Inherits:
-
Object
- Object
- Java::Classpath
- Defined in:
- lib/selenium-grid/lib/ruby/java/classpath.rb
Instance Method Summary collapse
- #<<(paths) ⇒ Object
- #definition ⇒ Object
-
#initialize(root_dir) ⇒ Classpath
constructor
A new instance of Classpath.
- #separator ⇒ Object
Constructor Details
#initialize(root_dir) ⇒ Classpath
Returns a new instance of Classpath.
6 7 8 9 10 |
# File 'lib/selenium-grid/lib/ruby/java/classpath.rb', line 6 def initialize(root_dir) @root = root_dir @locations = [] self end |
Instance Method Details
#<<(paths) ⇒ Object
12 13 14 15 |
# File 'lib/selenium-grid/lib/ruby/java/classpath.rb', line 12 def <<(paths) @locations = (@locations << Dir[@root + '/' + paths]).flatten self end |
#definition ⇒ Object
17 18 19 20 |
# File 'lib/selenium-grid/lib/ruby/java/classpath.rb', line 17 def definition @locations.map {|path| File.native_path(path)}.join(self.separator) end |
#separator ⇒ Object
22 23 24 |
# File 'lib/selenium-grid/lib/ruby/java/classpath.rb', line 22 def separator PLATFORM['win32'] ? ";" : ":" end |