Class: Navy::CommandBuilder
- Inherits:
-
Object
- Object
- Navy::CommandBuilder
- Defined in:
- lib/navy/command_builder.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Instance Method Summary collapse
- #build(options = {}) ⇒ Object
-
#initialize(container) ⇒ CommandBuilder
constructor
A new instance of CommandBuilder.
Constructor Details
#initialize(container) ⇒ CommandBuilder
Returns a new instance of CommandBuilder.
6 7 8 9 |
# File 'lib/navy/command_builder.rb', line 6 def initialize(container) @container = container @spec = container.specification end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
4 5 6 |
# File 'lib/navy/command_builder.rb', line 4 def container @container end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
4 5 6 |
# File 'lib/navy/command_builder.rb', line 4 def spec @spec end |
Instance Method Details
#build(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/navy/command_builder.rb', line 11 def build( = {}) cmd = [] docker_run(cmd) docker_name(cmd) docker_links(cmd) docker_env(cmd) docker_volumes_from(cmd) docker_misc_args(cmd) docker_image(cmd) execute_command(cmd, ) cmd.compact end |