Module: Nib::Command
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #alternate_compose_file ⇒ Object
- #entrypoint ⇒ Object
- #execute ⇒ Object
- #initialize(service, command, options = '') ⇒ Object
- #script ⇒ Object
Class Method Details
.included(base) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/nib/command.rb', line 2 def self.included(base) base.instance_eval do attr_reader :service, :command, :options extend ClassMethods end end |
Instance Method Details
#alternate_compose_file ⇒ Object
39 |
# File 'lib/nib/command.rb', line 39 def alternate_compose_file; end |
#entrypoint ⇒ Object
41 |
# File 'lib/nib/command.rb', line 41 def entrypoint; end |
#execute ⇒ Object
22 23 24 |
# File 'lib/nib/command.rb', line 22 def execute exec(script) end |
#initialize(service, command, options = '') ⇒ Object
16 17 18 19 20 |
# File 'lib/nib/command.rb', line 16 def initialize(service, command, = '') @service = service @command = command @options = end |
#script ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/nib/command.rb', line 26 def script @script ||= <<-SCRIPT docker-compose \ #{alternate_compose_file} \ run \ --rm \ #{entrypoint} \ #{} \ #{service} \ #{command} SCRIPT end |