Module: Nib::Command
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
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
#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 |
# File 'lib/nib/command.rb', line 26 def script @script ||= <<~SCRIPT docker-compose \ run \ --rm \ #{} \ #{service} \ #{command} SCRIPT end |