Module: Pave::Shell

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



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

def Shell.included base
  base.extend Shell
end

Instance Method Details

#sh(command) ⇒ Object



12
13
14
15
16
# File 'lib/pave/shell.rb', line 12

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

#shell(command) ⇒ Object



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

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