Class: GetVersion::ExecutablePathFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/getversion/executable_path_finder.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ExecutablePathFinder

Returns a new instance of ExecutablePathFinder.



4
5
6
# File 'lib/getversion/executable_path_finder.rb', line 4

def initialize(name)
  @name = name
end

Class Method Details

.find_dir(name) ⇒ Object



17
18
19
# File 'lib/getversion/executable_path_finder.rb', line 17

def self.find_dir(name)
  ExecutablePathFinder.new(name).find_dir
end

Instance Method Details

#find_dirObject



8
9
10
11
# File 'lib/getversion/executable_path_finder.rb', line 8

def find_dir
  path = find_path
  File.dirname path if path
end

#find_pathObject



13
14
15
# File 'lib/getversion/executable_path_finder.rb', line 13

def find_path
  is_windows? ? find_path_on_windows : find_path_on_unix
end