Class: Vagrant::Config::VMConfig
- Includes:
- Util::StackedProcRunner
- Defined in:
- lib/vagrant/config.rb
Instance Attribute Summary collapse
-
#base_mac ⇒ Object
Returns the value of attribute base_mac.
-
#box ⇒ Object
Returns the value of attribute box.
-
#box_ovf ⇒ Object
Returns the value of attribute box_ovf.
-
#disk_image_format ⇒ Object
Returns the value of attribute disk_image_format.
-
#forwarded_ports ⇒ Object
readonly
Returns the value of attribute forwarded_ports.
-
#hd_location ⇒ Object
Returns the value of attribute hd_location.
-
#project_directory ⇒ Object
Returns the value of attribute project_directory.
-
#provisioner ⇒ Object
Returns the value of attribute provisioner.
-
#shared_folder_gid ⇒ Object
Returns the value of attribute shared_folder_gid.
-
#shared_folder_uid ⇒ Object
Returns the value of attribute shared_folder_uid.
-
#shared_folders ⇒ Object
readonly
Returns the value of attribute shared_folders.
Attributes inherited from Base
Instance Method Summary collapse
- #customize(&block) ⇒ Object
- #forward_port(name, guestport, hostport, protocol = "TCP") ⇒ Object
-
#initialize ⇒ VMConfig
constructor
A new instance of VMConfig.
- #share_folder(name, guestpath, hostpath) ⇒ Object
Methods included from Util::StackedProcRunner
#proc_stack, #push_proc, #run_procs!
Methods inherited from Base
#[], #instance_variables_hash, #to_json
Constructor Details
#initialize ⇒ VMConfig
Returns a new instance of VMConfig.
89 90 91 92 93 |
# File 'lib/vagrant/config.rb', line 89 def initialize @forwarded_ports = {} @shared_folders = {} @provisioner = nil end |
Instance Attribute Details
#base_mac ⇒ Object
Returns the value of attribute base_mac.
79 80 81 |
# File 'lib/vagrant/config.rb', line 79 def base_mac @base_mac end |
#box ⇒ Object
Returns the value of attribute box.
77 78 79 |
# File 'lib/vagrant/config.rb', line 77 def box @box end |
#box_ovf ⇒ Object
Returns the value of attribute box_ovf.
78 79 80 |
# File 'lib/vagrant/config.rb', line 78 def box_ovf @box_ovf end |
#disk_image_format ⇒ Object
Returns the value of attribute disk_image_format.
84 85 86 |
# File 'lib/vagrant/config.rb', line 84 def disk_image_format @disk_image_format end |
#forwarded_ports ⇒ Object (readonly)
Returns the value of attribute forwarded_ports.
81 82 83 |
# File 'lib/vagrant/config.rb', line 81 def forwarded_ports @forwarded_ports end |
#hd_location ⇒ Object
Returns the value of attribute hd_location.
83 84 85 |
# File 'lib/vagrant/config.rb', line 83 def hd_location @hd_location end |
#project_directory ⇒ Object
Returns the value of attribute project_directory.
80 81 82 |
# File 'lib/vagrant/config.rb', line 80 def project_directory @project_directory end |
#provisioner ⇒ Object
Returns the value of attribute provisioner.
85 86 87 |
# File 'lib/vagrant/config.rb', line 85 def provisioner @provisioner end |
#shared_folder_gid ⇒ Object
Returns the value of attribute shared_folder_gid.
87 88 89 |
# File 'lib/vagrant/config.rb', line 87 def shared_folder_gid @shared_folder_gid end |
#shared_folder_uid ⇒ Object
Returns the value of attribute shared_folder_uid.
86 87 88 |
# File 'lib/vagrant/config.rb', line 86 def shared_folder_uid @shared_folder_uid end |
#shared_folders ⇒ Object (readonly)
Returns the value of attribute shared_folders.
82 83 84 |
# File 'lib/vagrant/config.rb', line 82 def shared_folders @shared_folders end |
Instance Method Details
#customize(&block) ⇒ Object
123 124 125 |
# File 'lib/vagrant/config.rb', line 123 def customize(&block) push_proc(&block) end |
#forward_port(name, guestport, hostport, protocol = "TCP") ⇒ Object
95 96 97 98 99 100 101 |
# File 'lib/vagrant/config.rb', line 95 def forward_port(name, guestport, hostport, protocol="TCP") forwarded_ports[name] = { :guestport => guestport, :hostport => hostport, :protocol => protocol } end |
#share_folder(name, guestpath, hostpath) ⇒ Object
103 104 105 106 107 108 |
# File 'lib/vagrant/config.rb', line 103 def share_folder(name, guestpath, hostpath) @shared_folders[name] = { :guestpath => guestpath, :hostpath => hostpath } end |