Class: Rooibos::Message::Batch
- Inherits:
-
Data
- Object
- Data
- Rooibos::Message::Batch
- Includes:
- Predicates
- Defined in:
- lib/rooibos/message/batch.rb
Overview
Completion sentinel from Command.batch.
Batch commands stream child messages live. When all children finish, this message signals completion. Use it to trigger follow-up actions or UI updates after parallel work completes.
Example
case msg
in Message::Batch
out.put(:all_done)
in [:progress, pct]
model.with(progress: pct)
end
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#batch? ⇒ Boolean
Returns
truefor batch completion messages. -
#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
#command ⇒ Object (readonly)
Returns the value of attribute command
25 26 27 |
# File 'lib/rooibos/message/batch.rb', line 25 def command @command end |
Instance Method Details
#batch? ⇒ Boolean
Returns true for batch completion messages.
29 30 31 |
# File 'lib/rooibos/message/batch.rb', line 29 def batch? true end |
#deconstruct_keys(_keys) ⇒ Object
Deconstructs for pattern matching.
34 35 36 |
# File 'lib/rooibos/message/batch.rb', line 34 def deconstruct_keys(_keys) { type: :batch, command: } end |