Method: Ufo::Util#execute
- Defined in:
- lib/ufo/util.rb
#execute(command, local_options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ufo/util.rb', line 24 def execute(command, ={}) if @options[:noop] && ![:live] say "NOOP: #{command}" result = true # always success with no noop for specs else if [:use_system] result = system(command) else result = `#{command}` end end result end |