Class: VagrantPlugins::VSphere::Action::CloseVSphere
- Inherits:
-
Object
- Object
- VagrantPlugins::VSphere::Action::CloseVSphere
- Defined in:
- lib/vSphere/action/close_vsphere.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ CloseVSphere
constructor
A new instance of CloseVSphere.
Constructor Details
#initialize(app, _env) ⇒ CloseVSphere
Returns a new instance of CloseVSphere.
7 8 9 |
# File 'lib/vSphere/action/close_vsphere.rb', line 7 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/vSphere/action/close_vsphere.rb', line 11 def call(env) env[:vSphere_connection].close @app.call env rescue Errors::VSphereError raise rescue StandardError => e raise Errors::VSphereError.new, e. end |