Class: VagrantPlugins::Openstack::Action::SyncFolders
- Inherits:
-
Object
- Object
- VagrantPlugins::Openstack::Action::SyncFolders
- Defined in:
- lib/vagrant-openstack-provider/action/sync_folders.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ SyncFolders
constructor
A new instance of SyncFolders.
Constructor Details
#initialize(app, _env) ⇒ SyncFolders
Returns a new instance of SyncFolders.
9 10 11 |
# File 'lib/vagrant-openstack-provider/action/sync_folders.rb', line 9 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/vagrant-openstack-provider/action/sync_folders.rb', line 13 def call(env) sync_method = env[:machine].provider_config.sync_method if sync_method == 'rsync' RsyncFolders.new(@app, env).call(env) elsif sync_method == 'none' NoSyncFolders.new(@app, env).call(env) else fail Errors::SyncMethodError, sync_method_value: sync_method end end |