Class: VagrantPlugins::StartCloud::Action::IsCreated
- Inherits:
-
Object
- Object
- VagrantPlugins::StartCloud::Action::IsCreated
- Defined in:
- lib/vagrant-startcloud/action/is_created.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ IsCreated
constructor
A new instance of IsCreated.
Constructor Details
#initialize(app, _env) ⇒ IsCreated
Returns a new instance of IsCreated.
7 8 9 |
# File 'lib/vagrant-startcloud/action/is_created.rb', line 7 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/vagrant-startcloud/action/is_created.rb', line 11 def call(env) # Set the result to be true if the machine is created env[:result] = env[:machine].state.id != :not_created # Call the next middleware @app.call(env) end |