Class: VagrantPlugins::Unison::UnisonPaths
- Inherits:
-
Object
- Object
- VagrantPlugins::Unison::UnisonPaths
- Defined in:
- lib/vagrant-unison2/unison_paths.rb
Instance Method Summary collapse
- #guest ⇒ Object
- #host ⇒ Object
-
#initialize(env, machine) ⇒ UnisonPaths
constructor
A new instance of UnisonPaths.
Constructor Details
#initialize(env, machine) ⇒ UnisonPaths
Returns a new instance of UnisonPaths.
4 5 6 7 |
# File 'lib/vagrant-unison2/unison_paths.rb', line 4 def initialize(env, machine) @env = env @machine = machine end |
Instance Method Details
#guest ⇒ Object
9 10 11 |
# File 'lib/vagrant-unison2/unison_paths.rb', line 9 def guest @machine.config.unison.guest_folder end |
#host ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/vagrant-unison2/unison_paths.rb', line 13 def host @host ||= begin path = File.(@machine.config.unison.host_folder, @env.root_path) # Make sure there is a trailing slash on the host path to # avoid creating an additional directory with rsync path = "#{path}/" if path !~ /\/$/ end end |