Class: Rooibos::Message::All
- Inherits:
-
Data
- Object
- Data
- Rooibos::Message::All
- Includes:
- Predicates
- Defined in:
- lib/rooibos/message/all.rb
Overview
Response from Command.all aggregating parallel execution.
Running multiple commands in parallel needs aggregated results. Without structured responses, handling mixed success/failure requires manual array parsing.
This response collects all child results and provides predicates for success checking. Include Predicates for safe predicate calls.
Use it to handle Command.all completions.
Example
case msg
in { type: :all, envelope: :parallel, results: }
model.with(outputs: results)
end
Instance Attribute Summary collapse
-
#envelope ⇒ Object
readonly
Returns the value of attribute envelope.
-
#nested ⇒ Object
readonly
Returns the value of attribute nested.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#all? ⇒ Boolean
Returns
truefor all responses. -
#deconstruct_keys(_keys) ⇒ Object
Deconstructs for pattern matching.
Methods included from Predicates
#==, #method_missing, #respond_to_missing?, #to_sym
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rooibos::Message::Predicates
Instance Attribute Details
#envelope ⇒ Object (readonly)
Returns the value of attribute envelope
28 29 30 |
# File 'lib/rooibos/message/all.rb', line 28 def envelope @envelope end |
#nested ⇒ Object (readonly)
Returns the value of attribute nested
28 29 30 |
# File 'lib/rooibos/message/all.rb', line 28 def nested @nested end |
#results ⇒ Object (readonly)
Returns the value of attribute results
28 29 30 |
# File 'lib/rooibos/message/all.rb', line 28 def results @results end |
Instance Method Details
#all? ⇒ Boolean
Returns true for all responses.
32 33 34 |
# File 'lib/rooibos/message/all.rb', line 32 def all? true end |
#deconstruct_keys(_keys) ⇒ Object
Deconstructs for pattern matching.
Returns a hash with :type, :envelope, :results, and :nested.
40 41 42 |
# File 'lib/rooibos/message/all.rb', line 40 def deconstruct_keys(_keys) { type: :all, envelope:, results:, nested: } end |