Class: Dk::Local::CmdSpy
Instance Attribute Summary collapse
Attributes inherited from BaseCmd
#cmd_str, #scmd
Instance Method Summary
collapse
Methods inherited from BaseCmd
#output_lines, #run, #stderr, #stdout, #success?, #to_s
Constructor Details
#initialize(cmd_str, opts = nil) ⇒ CmdSpy
Returns a new instance of CmdSpy.
62
63
64
65
66
|
# File 'lib/dk/local.rb', line 62
def initialize(cmd_str, opts = nil)
require 'scmd/command_spy'
super(Scmd::CommandSpy, cmd_str, opts)
@cmd_opts = opts
end
|
Instance Attribute Details
#cmd_opts ⇒ Object
Returns the value of attribute cmd_opts.
60
61
62
|
# File 'lib/dk/local.rb', line 60
def cmd_opts
@cmd_opts
end
|
Instance Method Details
#exitstatus=(value) ⇒ Object
75
|
# File 'lib/dk/local.rb', line 75
def exitstatus=(value); @scmd.exitstatus = value; end
|
#run_called? ⇒ Boolean
78
|
# File 'lib/dk/local.rb', line 78
def run_called?; @scmd.run_called?; end
|
#run_calls ⇒ Object
77
|
# File 'lib/dk/local.rb', line 77
def run_calls; @scmd.run_calls; end
|
68
69
70
71
|
# File 'lib/dk/local.rb', line 68
def run_input
return nil unless self.run_called?
self.run_calls.first.input
end
|
#ssh? ⇒ Boolean
80
|
# File 'lib/dk/local.rb', line 80
def ssh?; false; end
|
#stderr=(value) ⇒ Object
74
|
# File 'lib/dk/local.rb', line 74
def stderr=(value); @scmd.stderr = value; end
|
#stdout=(value) ⇒ Object
73
|
# File 'lib/dk/local.rb', line 73
def stdout=(value); @scmd.stdout = value; end
|