Class: VagrantPlugins::Openstack::Action::SyncFolders
- Inherits:
-
AbstractAction
- Object
- AbstractAction
- VagrantPlugins::Openstack::Action::SyncFolders
- Defined in:
- lib/vagrant-openstack-provider/action/sync_folders.rb
Instance Method Summary collapse
- #execute(env) ⇒ Object
-
#initialize(app, _env) ⇒ SyncFolders
constructor
A new instance of SyncFolders.
Methods inherited from AbstractAction
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 |