Class: VagrantPlugins::HostPath::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::HostPath::Config
- Defined in:
- lib/vagrant-host-path/config.rb
Instance Attribute Summary collapse
-
#env_key ⇒ String
The name of environment variable to set.
-
#path_file ⇒ String
The path to the tmp file used to store the actual host path.
-
#profile_path ⇒ String
The path to a profile file (typically inside of a /etc/profile.d/ dir).
-
#temp_upload_path ⇒ String
The path to the tmp file used to upload profile path.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
24 25 26 27 28 29 |
# File 'lib/vagrant-host-path/config.rb', line 24 def initialize @env_key = UNSET_VALUE @path_file = UNSET_VALUE @profile_path = UNSET_VALUE @temp_upload_path = UNSET_VALUE end |
Instance Attribute Details
#env_key ⇒ String
The name of environment variable to set.
7 8 9 |
# File 'lib/vagrant-host-path/config.rb', line 7 def env_key @env_key end |
#path_file ⇒ String
The path to the tmp file used to store the actual host path.
12 13 14 |
# File 'lib/vagrant-host-path/config.rb', line 12 def path_file @path_file end |
#profile_path ⇒ String
The path to a profile file (typically inside of a /etc/profile.d/ dir).
17 18 19 |
# File 'lib/vagrant-host-path/config.rb', line 17 def profile_path @profile_path end |
#temp_upload_path ⇒ String
The path to the tmp file used to upload profile path.
22 23 24 |
# File 'lib/vagrant-host-path/config.rb', line 22 def temp_upload_path @temp_upload_path end |
Instance Method Details
#finalize! ⇒ Object
31 32 33 34 35 36 |
# File 'lib/vagrant-host-path/config.rb', line 31 def finalize! @env_key = "VAGRANT_HOST_PATH" if @env_key == UNSET_VALUE @path_file = "/tmp/.vagrant-host-path" if @path_file == UNSET_VALUE @profile_path = "/etc/profile.d/vagrant-host-path.sh" if @profile_path == UNSET_VALUE @temp_upload_path = "/tmp/vagrant-host-path-profile.sh" if @temp_upload_path == UNSET_VALUE end |