32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/toolrack/process_utils.rb', line 32
def instance(type, cmd, opts = { }, &block)
case type
when :basic
Antrapol::ToolRack::Logger.instance.glogger.debug "Basic execution"
basic_exec(cmd, &block)
when :system
Antrapol::ToolRack::Logger.instance.glogger.debug "System execution"
system_exec(cmd, opts, &block)
when :popen3
Antrapol::ToolRack::Logger.instance.glogger.debug "Popen3 execution"
popen3_exec(cmd, opts, &block)
else
Antrapol::ToolRack::Logger.instance.glogger.debug "Basic (fallback) execution"
basic_exec(cmd, &block)
end
end
|