class ZAWS::Helper::Shell
Public Instance Methods
cli(command,output=nil)
click to toggle source
# File lib/zaws/helper/shell.rb, line 7 def cli(command,output=nil) output.puts ZAWS::Helper::Output.colorize(command,AWS_consts::COLOR_BLUE) if output list = Mixlib::ShellOut.new(command, :timeout => 30) list.run_command list.error! return list.stdout end
if_then(condition,command,output=nil)
click to toggle source
# File lib/zaws/helper/shell.rb, line 15 def if_then(condition,command,output=nil) if not condition output.puts ZAWS::Helper::Output.colorize(command,AWS_consts::COLOR_BLUE) if output return nil end return cli(command,output) end