Class: Debsacker::SystemGateway

Inherits:
Object
  • Object
show all
Defined in:
lib/debsacker/system_gateway.rb

Class Method Summary collapse

Class Method Details

.perform(command) ⇒ Object



5
6
7
8
# File 'lib/debsacker/system_gateway.rb', line 5

def perform(command)
  puts "\033[34mPerforming: #{ command }\033[0m"
  IO.popen(command).read
end

.perform_with_exit_code(command) ⇒ Object



10
11
12
13
14
# File 'lib/debsacker/system_gateway.rb', line 10

def perform_with_exit_code(command)
  puts "\033[34mPerforming: #{ command }\033[0m"
  system(command)
  $?.success?
end