Class: CommandLine_Exe
Direct Known Subclasses
Instance Attribute Summary collapse
-
#exe_path ⇒ Object
Returns the value of attribute exe_path.
Instance Method Summary collapse
- #executable_path(exe_name) ⇒ Object
-
#initialize(exe_name, *params) ⇒ CommandLine_Exe
constructor
A new instance of CommandLine_Exe.
Methods included from Utilities
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_path ⇒ Object
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 |