Module: MetaBridge::Command

Included in:
ARP, Bridge
Defined in:
lib/meta_bridge/command.rb

Instance Method Summary collapse

Instance Method Details

#run(cmd, &block) ⇒ Object



4
5
6
7
8
# File 'lib/meta_bridge/command.rb', line 4

def run(cmd, &block)
  Open3.popen2e(cmd) do |stdin, out, wait_thr|
    yield(out, wait_thr) if block_given?
  end
end