Class: VagrantPlugins::Orchestrate::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::Orchestrate::Config
- Defined in:
- lib/vagrant-orchestrate/config.rb
Defined Under Namespace
Classes: Credentials
Instance Attribute Summary collapse
-
#credentials {|@credentials| ... } ⇒ Object
Returns the value of attribute credentials.
-
#filter_managed_commands ⇒ Object
Returns the value of attribute filter_managed_commands.
-
#force_push ⇒ Object
Returns the value of attribute force_push.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#merge(new_config) ⇒ Object
It was a little hard to dig up, but this method gets called on the more general config object, with the more specific config as the argument.
Constructor Details
#initialize ⇒ Config
12 13 14 15 16 17 |
# File 'lib/vagrant-orchestrate/config.rb', line 12 def initialize @filter_managed_commands = UNSET_VALUE @strategy = UNSET_VALUE @force_push = UNSET_VALUE @credentials = Credentials.new end |
Instance Attribute Details
#credentials {|@credentials| ... } ⇒ Object
Returns the value of attribute credentials.
10 11 12 |
# File 'lib/vagrant-orchestrate/config.rb', line 10 def credentials @credentials end |
#filter_managed_commands ⇒ Object
Returns the value of attribute filter_managed_commands.
7 8 9 |
# File 'lib/vagrant-orchestrate/config.rb', line 7 def filter_managed_commands @filter_managed_commands end |
#force_push ⇒ Object
Returns the value of attribute force_push.
9 10 11 |
# File 'lib/vagrant-orchestrate/config.rb', line 9 def force_push @force_push end |
#strategy ⇒ Object
Returns the value of attribute strategy.
8 9 10 |
# File 'lib/vagrant-orchestrate/config.rb', line 8 def strategy @strategy end |
Instance Method Details
#finalize! ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/vagrant-orchestrate/config.rb', line 39 def finalize! @filter_managed_commands = false if @filter_managed_commands == UNSET_VALUE @strategy = :serial if @strategy == UNSET_VALUE @force_push = false if @force_push == UNSET_VALUE @credentials = nil if @credentials.unset? @credentials.finalize! if @credentials end |
#merge(new_config) ⇒ Object
It was a little hard to dig up, but this method gets called on the more general config object, with the more specific config as the argument. github.com/mitchellh/vagrant/blob/master/lib/vagrant/config/v2/loader.rb
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/vagrant-orchestrate/config.rb', line 27 def merge(new_config) super.tap do |result| if new_config.credentials.unset? result.credentials = @credentials elsif @credentials.unset? result.credentials = new_config.credentials else result.credentials = @credentials.merge(new_config.credentials) end end end |