Class: Dockerploy::ShellClient

Inherits:
Object
  • Object
show all
Defined in:
lib/dockerploy/shell_client.rb

Overview

Wrapper for local shell command

Instance Method Summary collapse

Constructor Details

#initializeShellClient

Returns a new instance of ShellClient.



4
5
# File 'lib/dockerploy/shell_client.rb', line 4

def initialize
end

Instance Method Details

#command(command) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/dockerploy/shell_client.rb', line 7

def command(command)
  system(command)
  unless $?.success?
    Dockerploy.logger.info sprintf('Exit Code: %d', $?.exitstatus)
    return false
  end
  true
end