Class: ConfigBuilder::Model::Provider::VMware
- Defined in:
- lib/config_builder/model/provider/vmware.rb
Overview
Direct Known Subclasses
Instance Attribute Summary collapse
-
#gui ⇒ Boolean
Whether the GUI should be launched when the VM is created.
-
#vmx ⇒ Hash<String, String>
A hash of VMX options for the given VM.
Instance Method Summary collapse
-
#initialize ⇒ VMware
constructor
A new instance of VMware.
- #to_proc ⇒ Object
Methods inherited from Base
Methods inherited from Base
#attr, #attrs=, #call, #configure!, def_model_attribute, def_model_delegator, def_model_id, def_model_option, #eval_models, #instance_id, #instance_options, model_attributes, model_delegators, #model_delegators, model_options, new_from_hash, #with_attr
Constructor Details
#initialize ⇒ VMware
Returns a new instance of VMware.
17 18 19 20 21 22 23 24 |
# File 'lib/config_builder/model/provider/vmware.rb', line 17 def initialize @defaults = { :gui => false, :vmx => {}, } @providers ||= %w[vmware_fusion vmware_workstation] end |
Instance Attribute Details
#gui ⇒ Boolean
Returns Whether the GUI should be launched when the VM is created.
15 |
# File 'lib/config_builder/model/provider/vmware.rb', line 15 def_model_attribute :gui |
#vmx ⇒ Hash<String, String>
Returns A hash of VMX options for the given VM.
11 |
# File 'lib/config_builder/model/provider/vmware.rb', line 11 def_model_attribute :vmx |
Instance Method Details
#to_proc ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/config_builder/model/provider/vmware.rb', line 26 def to_proc Proc.new do |vm_config| @providers.each do |vmware_provider| vm_config.provider vmware_provider do |provider, override| provider.gui = attr(:gui) attr(:vmx).each_pair do |key, value| provider.vmx[key] = value end eval_models([provider, override]) end end end end |