Class: CommandLine_Exe

Inherits:
Object
  • Object
show all
Includes:
Utilities
Defined in:
lib/exe_command.rb

Direct Known Subclasses

ExeCppLogReader, Exe_CompareDeterminations

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utilities

which

Constructor Details

#initialize(exe_name, *params) ⇒ CommandLine_Exe

Returns a new instance of CommandLine_Exe.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/exe_command.rb', line 9

def initialize(exe_name,*params)

  @exe_name = exe_name

  @exe_path =
      if params.empty? || params.first.nil?
        executable_path exe_name
      else
        params.first
      end

end

Instance Attribute Details

#exe_pathObject

Returns the value of attribute exe_path.



5
6
7
# File 'lib/exe_command.rb', line 5

def exe_path
  @exe_path
end

Instance Method Details

#executable_path(exe_name) ⇒ Object



22
23
24
# File 'lib/exe_command.rb', line 22

def executable_path(exe_name)
  Utilities.which(exe_name)
end