Class: Appd::App
- Inherits:
-
Object
- Object
- Appd::App
- Defined in:
- lib/appd/app.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #build(*services) ⇒ Object
- #exec(service, command) ⇒ Object
-
#initialize(options) ⇒ App
constructor
A new instance of App.
- #ps ⇒ Object
- #restart(*services) ⇒ Object
- #stop(*services) ⇒ Object
- #up(*services) ⇒ Object
Constructor Details
#initialize(options) ⇒ App
Returns a new instance of App.
5 6 7 |
# File 'lib/appd/app.rb', line 5 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/appd/app.rb', line 3 def @options end |
Instance Method Details
#build(*services) ⇒ Object
13 14 15 |
# File 'lib/appd/app.rb', line 13 def build(*services) docker_compose("build #{services.join(" ")}") end |
#exec(service, command) ⇒ Object
29 30 31 |
# File 'lib/appd/app.rb', line 29 def exec(service, command) docker_compose("exec #{service} #{command}") end |
#ps ⇒ Object
9 10 11 |
# File 'lib/appd/app.rb', line 9 def ps docker_compose("ps") end |
#restart(*services) ⇒ Object
25 26 27 |
# File 'lib/appd/app.rb', line 25 def restart(*services) docker_compose("restart #{services.join(" ")}") end |
#stop(*services) ⇒ Object
21 22 23 |
# File 'lib/appd/app.rb', line 21 def stop(*services) docker_compose("stop #{services.join(" ")}") end |
#up(*services) ⇒ Object
17 18 19 |
# File 'lib/appd/app.rb', line 17 def up(*services) docker_compose("up -d #{services.join(" ")}") end |