Module: OrangeLib::CommandLine
- Included in:
- Rest
- Defined in:
- lib/orange_lib/command_line.rb
Instance Method Summary collapse
-
#execute_command(command) ⇒ String
Execute a command line.
Instance Method Details
#execute_command(command) ⇒ String
Execute a command line
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/orange_lib/command_line.rb', line 10 def execute_command(command) output = '' Open3.popen2e(command) {|stdin, stdout_and_stderr, wait_thr| stdout_and_stderr.each{|line| puts line output << line } } output end |