Module: Pave::Shell

Included in:
Concrete, Database, VirtualHost
Defined in:
lib/pave/shell.rb

Instance Method Summary collapse

Instance Method Details

#sh(command) ⇒ Object



8
9
10
11
12
# File 'lib/pave/shell.rb', line 8

def sh(command)
  result = shell(command)
  puts result.output
  result.status
end

#shell(command) ⇒ Object



3
4
5
6
# File 'lib/pave/shell.rb', line 3

def shell(command)
  output = `#{command}`
  Struct.new(:status, :output).new($?, output)
end