Method: Webdrivers::System.call
- Defined in:
- lib/webdrivers/system.rb
.call(process, arg = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/webdrivers/system.rb', line 184 def call(process, arg = nil) cmd = arg ? [process, arg] : process # Windows provides powershell command (process) only, no args. Webdrivers.logger.debug "making System call: #{cmd}" p = IO.popen(cmd) out = p.read p.close raise "Failed to make system call: #{cmd}" unless $CHILD_STATUS.success? Webdrivers.logger.debug "System call returned: #{out}" out end |