Module: Treaty::Action::Versions::Workspace
- Defined in:
- lib/treaty/action/versions/workspace.rb
Overview
Core execution module for treaty call! method.
Purpose
Provides the call! instance method that orchestrates the complete
treaty execution flow: version resolution, request validation,
service execution, and response validation.
Usage
Included via:
- Versions::DSL (when DSL is included in treaty class)
Called by:
- Controller integration (via Treaty::Action::Base.call!)
Execution Flow
call!(context:, inventory:, version:, params:)
│
├─1─► Resolver.resolve! ──► Find version factory
│
├─2─► Request::Validator.validate! ──► Validate params
│
├─3─► Execution::Request.execute! ──► Run service
│
├─4─► Response::Validator.validate! ──► Validate response
│
└─5─► Result.new ──► Return result object
Parameters
| Parameter | Description |
|---|---|
| context | Controller instance |
| inventory | Inventory::Collection with controller data |
| version | Requested version string (or nil for default) |
| params | Request parameters |
Return Value
Returns Treaty::Action::Result with:
data- Validated response hashstatus- HTTP status codeversion- Resolved version string