Method: Scmd::CommandSpy#initialize
- Defined in:
- lib/scmd/command_spy.rb
#initialize(cmd_str, opts = nil) ⇒ CommandSpy
Returns a new instance of CommandSpy.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/scmd/command_spy.rb', line 12 def initialize(cmd_str, opts = nil) opts ||= {} @cmd_str = cmd_str @env = opts[:env] = opts[:options] @run_calls, @run_bang_calls, @start_calls = [], [], [] @wait_calls, @stop_calls, @kill_calls = [], [], [] @running = false @stdout, @stderr, @pid, @exitstatus = '', '', 1, 0 end |