Class: DockerSync::DockerComposeSession
- Inherits:
-
Object
- Object
- DockerSync::DockerComposeSession
- Defined in:
- lib/docker-sync/docker_compose_session.rb
Overview
based on ‘Docker::Compose::Compose` from `docker-compose` gem
Instance Method Summary collapse
- #down ⇒ Object
-
#initialize(dir: nil, files: nil) ⇒ DockerComposeSession
constructor
A new instance of DockerComposeSession.
- #stop ⇒ Object
- #up(build: false) ⇒ Object
Constructor Details
#initialize(dir: nil, files: nil) ⇒ DockerComposeSession
Returns a new instance of DockerComposeSession.
6 7 8 9 10 |
# File 'lib/docker-sync/docker_compose_session.rb', line 6 def initialize(dir: nil, files: nil) @dir = dir @files = files || [] # Array[String] @last_command = nil end |
Instance Method Details
#down ⇒ Object
23 24 25 |
# File 'lib/docker-sync/docker_compose_session.rb', line 23 def down run!('down') end |
#stop ⇒ Object
19 20 21 |
# File 'lib/docker-sync/docker_compose_session.rb', line 19 def stop run!('stop') end |
#up(build: false) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/docker-sync/docker_compose_session.rb', line 12 def up(build: false) args = [] args << '--build' if build run!('up', *args) end |