Class: Rooibos::Command::Bubble

Inherits:
Object
  • Object
show all
Includes:
Custom
Defined in:
lib/rooibos/command/bubble.rb

Overview

Carries a message outward through the fragment hierarchy.

Nested fragments produce signals. Outer fragments consume them. Passing callbacks down the tree couples fragments tightly. Direct references make reuse difficult.

This command wraps a message for bubbling. Outer fragments intercept it and decide how to handle it. With the Router DSL, use observe or intercept. Without the Router, check for Command::Bubble manually and extract the message. Unhandled bubbles can be re-returned to continue propagation outward.

The runtime does not execute this command. Outer fragments handle it. Calling call raises an error.

message

The payload to propagate outward.

Instance Method Summary collapse

Methods included from Custom

#deconstruct_keys, #rooibos_cancellation_grace_period, #rooibos_command?

Instance Method Details

#call(_out, _token) ⇒ Object

No-op: unhandled bubbles that escape the Router hierarchy( when no fragment intercepts the message) are silently dropped.



31
# File 'lib/rooibos/command/bubble.rb', line 31

def call(_out, _token) = nil