class RBatch::CmdResult
Result of external command wrapper
Attributes
cmd_str[R]
Command string @return [String]
status[R]
Exit status @return [Integer]
stderr_file[R]
Tmp file including STDERROR String @return [File]
stdout_file[R]
Tmp file including STDOUT String @return [File]
Public Class Methods
new(stdout_file, stderr_file, status, cmd_str)
click to toggle source
@private
# File lib/rbatch/cmd.rb, line 94 def initialize(stdout_file, stderr_file, status, cmd_str) @stdout_file = stdout_file @stderr_file = stderr_file @status = status @cmd_str = cmd_str end
Public Instance Methods
stderr()
click to toggle source
STDERR String @return [String]
# File lib/rbatch/cmd.rb, line 109 def stderr File.read(@stderr_file) end
stdout()
click to toggle source
STDOUT String @return [String]
# File lib/rbatch/cmd.rb, line 103 def stdout File.read(@stdout_file) end
to_h()
click to toggle source
Return hash including cmd_str
, std_out, std_err, and status @return [Hash]
# File lib/rbatch/cmd.rb, line 115 def to_h {:cmd_str => @cmd_str,:stdout => stdout, :stderr => stderr, :status => status} end
to_s()
click to toggle source
Return string including cmd_str
, std_out, std_err, and status @return [String]
# File lib/rbatch/cmd.rb, line 121 def to_s to_h.to_s end