Class: Percheron::Actions::Shell

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/percheron/actions/shell.rb

Constant Summary collapse

DEFAULT_COMMAND =
'/bin/sh'
DOCKER_CLIENT =
'docker'

Instance Method Summary collapse

Methods included from Base

#base_dir, #in_working_directory

Constructor Details

#initialize(unit, raw_command: DEFAULT_COMMAND) ⇒ Shell

Returns a new instance of Shell.



9
10
11
12
# File 'lib/percheron/actions/shell.rb', line 9

def initialize(unit, raw_command: DEFAULT_COMMAND)
  @unit = unit
  @raw_command = raw_command
end

Instance Method Details

#execute!Object



14
15
16
# File 'lib/percheron/actions/shell.rb', line 14

def execute!
  exec! if valid?
end