Method: #shell

Defined in:
lib/ult/execute.rb

#shell(command, &block) ⇒ Object



57
58
59
60
61
62
63
64
65
# File 'lib/ult/execute.rb', line 57

def shell( command, &block )
  status = execute( command )
  if block_given?
    status = block.call( status )
  else
    raise "#{command} => #{status}" if 0 != status
  end
  status
end