struct FSM::Transition

Overview

Represents a transition from one state to another triggered by an event.

@property event [String] The event that triggers the transition. @property target [String] The target state after the transition. @property callbacks [Callable(String, Context)?] Optional callback to be executed during the transition.

Defined in:

fsm/transition.cr

Instance Method Summary

Instance Method Detail

def event : String #

The event that triggers the transition.


[View source]
def guard(&block : String, Context -> ) : self #

[View source]
def on(&block : String, Context -> ) : self #

[View source]
def target : String #

The target state after the transition.


[View source]