Module: ClearcaseHelper::Executables
Instance Method Summary collapse
-
#cleartool(command, options = {}) ⇒ Array[Boolean, String]
Success, stdout.
Instance Method Details
#cleartool(command, options = {}) ⇒ Array[Boolean, String]
Returns success, stdout.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/clearcase_helper/executables.rb', line 6 def cleartool(command, ={}) cmd = "cleartool #{command}" stdout = [:noop] ? '' : `#{cmd}` success = $? == 0 puts "# #{cmd} (#{$?}, #{success})=>" if [:verbose] if [:verbose] && ![:nostdout] && !stdout.empty? puts stdout.split("\n").collect {|l| " #{l}"}.join("\n") end $stdout.flush return success, stdout end |