Class: VagrantPlugins::DockerComposeProvisioner::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::DockerComposeProvisioner::Config
- Defined in:
- lib/vagrant-docker-compose/config.rb
Constant Summary collapse
- DEFAULT_COMMAND_OPTIONS =
{ rm: "--force", up: "-d" }
Instance Attribute Summary collapse
-
#command_options ⇒ Object
Returns the value of attribute command_options.
-
#compose_version ⇒ Object
Returns the value of attribute compose_version.
-
#executable ⇒ Object
Returns the value of attribute executable.
-
#options ⇒ Object
Returns the value of attribute options.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#rebuild ⇒ Object
Returns the value of attribute rebuild.
-
#yml ⇒ Object
Returns the value of attribute yml.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 22 |
# File 'lib/vagrant-docker-compose/config.rb', line 16 def initialize @executable = UNSET_VALUE @project_name = UNSET_VALUE @compose_version = UNSET_VALUE @options = UNSET_VALUE @command_options = UNSET_VALUE end |
Instance Attribute Details
#command_options ⇒ Object
Returns the value of attribute command_options.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def @command_options end |
#compose_version ⇒ Object
Returns the value of attribute compose_version.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def compose_version @compose_version end |
#executable ⇒ Object
Returns the value of attribute executable.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def executable @executable end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def @options end |
#project_name ⇒ Object
Returns the value of attribute project_name.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def project_name @project_name end |
#rebuild ⇒ Object
Returns the value of attribute rebuild.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def rebuild @rebuild end |
#yml ⇒ Object
Returns the value of attribute yml.
9 10 11 |
# File 'lib/vagrant-docker-compose/config.rb', line 9 def yml @yml end |
Instance Method Details
#finalize! ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/vagrant-docker-compose/config.rb', line 24 def finalize! @executable = "/usr/local/bin/docker-compose" if @executable == UNSET_VALUE @project_name = nil if @project_name == UNSET_VALUE @compose_version = "1.5.0" if @compose_version == UNSET_VALUE @options = nil if @options == UNSET_VALUE @command_options = {} if @command_options == UNSET_VALUE @command_options = DEFAULT_COMMAND_OPTIONS.merge(@command_options) end |