Class: VagrantPlugins::ConoHa::Action::SyncFolders

Inherits:
AbstractAction show all
Defined in:
lib/vagrant-conoha/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.



10
11
12
# File 'lib/vagrant-conoha/action/sync_folders.rb', line 10

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

Instance Method Details

#execute(env) ⇒ Object



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

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