Class: VagrantPlugins::Openstack::Action::SyncFolders

Inherits:
AbstractAction
  • Object
show all
Defined in:
lib/vagrant-openstack-provider/action/sync_folders.rb

Instance Method Summary collapse

Methods inherited from AbstractAction

#call

Constructor Details

#initialize(app, _env) ⇒ SyncFolders

Returns a new instance of SyncFolders.



11
12
13
# File 'lib/vagrant-openstack-provider/action/sync_folders.rb', line 11

def initialize(app, _env)
  @app = app
end

Instance Method Details

#execute(env) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/vagrant-openstack-provider/action/sync_folders.rb', line 15

def execute(env)
  sync_method = env[:machine].provider_config.sync_method
  if sync_method == 'none'
    NoSyncFolders.new(@app, env).call(env)
  elsif sync_method == 'rsync'
    RsyncFolders.new(@app, env).call(env)
  else
    fail Errors::SyncMethodError, sync_method_value: sync_method
  end
end