Class: VagrantPlugins::HostPath::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::HostPath::Config
- Defined in:
- lib/vagrant-host-path/config.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Bool
Is plugin enabled or disabled.
-
#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.
29 30 31 32 33 34 35 |
# File 'lib/vagrant-host-path/config.rb', line 29 def initialize @enabled = UNSET_VALUE @env_key = UNSET_VALUE @path_file = UNSET_VALUE @profile_path = UNSET_VALUE @temp_upload_path = UNSET_VALUE end |
Instance Attribute Details
#enabled ⇒ Bool
Is plugin enabled or disabled.
7 8 9 |
# File 'lib/vagrant-host-path/config.rb', line 7 def enabled @enabled end |
#env_key ⇒ String
The name of environment variable to set.
12 13 14 |
# File 'lib/vagrant-host-path/config.rb', line 12 def env_key @env_key end |
#path_file ⇒ String
The path to the tmp file used to store the actual host path.
17 18 19 |
# File 'lib/vagrant-host-path/config.rb', line 17 def path_file @path_file end |
#profile_path ⇒ String
The path to a profile file (typically inside of a /etc/profile.d/ dir).
22 23 24 |
# File 'lib/vagrant-host-path/config.rb', line 22 def profile_path @profile_path end |
#temp_upload_path ⇒ String
The path to the tmp file used to upload profile path.
27 28 29 |
# File 'lib/vagrant-host-path/config.rb', line 27 def temp_upload_path @temp_upload_path end |
Instance Method Details
#finalize! ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/vagrant-host-path/config.rb', line 37 def finalize! @enabled = true if @enabled == UNSET_VALUE @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 |