Class: VagrantPlugins::GANETI::Action::IsReachable
- Inherits:
-
Object
- Object
- VagrantPlugins::GANETI::Action::IsReachable
- Defined in:
- lib/vagrant-ganeti/action/is_reachable.rb
Overview
This can be used with “Call” built-in to check if the machine is created and branch in the middleware.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ IsReachable
constructor
A new instance of IsReachable.
Constructor Details
#initialize(app, env) ⇒ IsReachable
Returns a new instance of IsReachable.
7 8 9 |
# File 'lib/vagrant-ganeti/action/is_reachable.rb', line 7 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 |
# File 'lib/vagrant-ganeti/action/is_reachable.rb', line 11 def call(env) env[:result] = true @app.call(env) end |