class Dk::Remote::CmdSpy
Attributes
cmd_opts[R]
Public Class Methods
new(cmd_str, opts = nil)
click to toggle source
Calls superclass method
Dk::Remote::BaseCmd::new
# File lib/dk/remote.rb, line 108 def initialize(cmd_str, opts = nil) super(Dk::Local::CmdSpy, cmd_str, opts) @cmd_opts = opts @first_local_cmd_spy = @local_cmds[@hosts.first] end
Public Instance Methods
exitstatus=(value)
click to toggle source
# File lib/dk/remote.rb, line 122 def exitstatus=(value); @first_local_cmd_spy.exitstatus = value; end
run_called?()
click to toggle source
# File lib/dk/remote.rb, line 126 def run_called?; @first_local_cmd_spy.scmd.start_called?; end
run_calls()
click to toggle source
just query the firs tlocal cmd - if run for one it was run for all
# File lib/dk/remote.rb, line 125 def run_calls; @first_local_cmd_spy.scmd.start_calls; end
run_input()
click to toggle source
# File lib/dk/remote.rb, line 114 def run_input return nil unless self.run_called? self.run_calls.first.input end
ssh?()
click to toggle source
# File lib/dk/remote.rb, line 128 def ssh?; true; end
stderr=(value)
click to toggle source
# File lib/dk/remote.rb, line 121 def stderr=(value); @first_local_cmd_spy.stderr = value; end
stdout=(value)
click to toggle source
just set the first local cmd, this will have an overall effect
# File lib/dk/remote.rb, line 120 def stdout=(value); @first_local_cmd_spy.stdout = value; end