Class: VagrantLXD::Action::RemoveData
- Inherits:
-
Object
- Object
- VagrantLXD::Action::RemoveData
- Includes:
- FileUtils
- Defined in:
- lib/vagrant-lxd/action.rb
Overview
Remove all files from the provider’s data directory.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ RemoveData
constructor
A new instance of RemoveData.
Constructor Details
#initialize(app, env) ⇒ RemoveData
Returns a new instance of RemoveData.
104 105 106 |
# File 'lib/vagrant-lxd/action.rb', line 104 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
108 109 110 111 112 113 |
# File 'lib/vagrant-lxd/action.rb', line 108 def call(env) @app.call(env) ensure rm_rf(env[:machine].data_dir) mkdir_p(env[:machine].data_dir) end |