Class: Percheron::Actions::Shell
- Inherits:
-
Object
- Object
- Percheron::Actions::Shell
- Includes:
- Base
- Defined in:
- lib/percheron/actions/shell.rb
Constant Summary collapse
- DEFAULT_COMMAND =
'/bin/sh'- DOCKER_CLIENT =
'docker'
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(unit, raw_command: DEFAULT_COMMAND) ⇒ Shell
constructor
A new instance of Shell.
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 |