Class: Aruba::Platforms::UnixWhich::AbsoluteOrRelativePathWhich
- Inherits:
-
Object
- Object
- Aruba::Platforms::UnixWhich::AbsoluteOrRelativePathWhich
- Defined in:
- lib/aruba/platforms/unix_which.rb
Overview
Find path for absolute or relative command
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
permalink .match?(program) ⇒ Boolean
22 23 24 |
# File 'lib/aruba/platforms/unix_which.rb', line 22 def self.match?(program) Aruba.platform.absolute_path?(program) || Aruba.platform.relative_command?(program) end |
Instance Method Details
permalink #call(program, _path) ⇒ Object
[View source]
26 27 28 29 30 |
# File 'lib/aruba/platforms/unix_which.rb', line 26 def call(program, _path) return File.(program) if Aruba.platform.executable?(program) nil end |