Class: VagrantPlugins::OrbStack::Action::Reload
- Inherits:
-
Object
- Object
- VagrantPlugins::OrbStack::Action::Reload
- Defined in:
- lib/vagrant-orbstack/action/reload.rb
Overview
Action middleware for reloading (restarting) OrbStack machines.
This is a Composition Action that orchestrates Halt + Start actions rather than directly interacting with OrbStack CLI. Following the composition pattern, this class:
- Does NOT include MachineValidation (composed actions handle validation)
- Does NOT directly call OrbStackCLI (delegates to Halt/Start)
- Does NOT manage state cache (composed actions handle invalidation)
The actual work is performed by the Action::Builder chain in the provider's action method, which composes: Halt → Start → (optional) Provision
This class exists as a pattern consistency marker and for potential future pre/post reload logic that doesn't fit in the composed actions.
See docs/DESIGN.md "Action Patterns" section for pattern documentation.
Instance Method Summary collapse
-
#call(env) ⇒ Object
Execute the middleware.
-
#initialize(app, _env) ⇒ Reload
constructor
Initialize the middleware.
Constructor Details
#initialize(app, _env) ⇒ Reload
Initialize the middleware.
36 37 38 |
# File 'lib/vagrant-orbstack/action/reload.rb', line 36 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
Execute the middleware.
This is a pass-through middleware - the actual reload logic is composed in the provider's action method. This class exists to maintain consistency with the action middleware pattern.
49 50 51 52 |
# File 'lib/vagrant-orbstack/action/reload.rb', line 49 def call(env) # Continue middleware chain @app.call(env) end |