Class: Docker::Compose::ShellPrinter::Posix
- Inherits:
-
Object
- Object
- Docker::Compose::ShellPrinter::Posix
- Defined in:
- lib/docker/compose/shell_printer/posix.rb
Overview
Printer that works with any POSIX-compliant shell e.g. sh, bash, zsh
Direct Known Subclasses
Instance Method Summary collapse
- #comment(value) ⇒ Object
- #eval_output(command) ⇒ Object
- #export(name, value) ⇒ Object
- #unset(name) ⇒ Object
Instance Method Details
#comment(value) ⇒ Object
5 6 7 |
# File 'lib/docker/compose/shell_printer/posix.rb', line 5 def comment(value) format('# %s', value) end |
#eval_output(command) ⇒ Object
9 10 11 |
# File 'lib/docker/compose/shell_printer/posix.rb', line 9 def eval_output(command) format('eval "$(%s)"', command) end |
#export(name, value) ⇒ Object
13 14 15 |
# File 'lib/docker/compose/shell_printer/posix.rb', line 13 def export(name, value) format('export %s=%s', name, single_quoted_escaped(value)) end |
#unset(name) ⇒ Object
17 18 19 |
# File 'lib/docker/compose/shell_printer/posix.rb', line 17 def unset(name) format('unset %s', name) end |