Smcr::StateMachine(State)
Inherits JSON::Serializable < Reference < Object
Constants
ERROR_KEY_PATHS_ALLOWED = "paths_allowed"
STATE_NOT_SET = :state_not_set
Constructors
new(pull : JSON::PullParser)
Sourcenew(state_default : State | Nil = nil, history_size : HistorySize | Nil = nil, tick : Tick | Nil = nil, state : State | Nil = nil, history : StateChangeHistory | Nil = nil, paths_allowed : PathsAllowed | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceClass methods
state_class
Sourcestate_internal_values
Sourcestate_names
Sourcestate_values
SourceInstance methods
add_path(state_from, state_to)
Sourceerrors
Sourcehistory
Sourcehistory_size
Sourceinit_paths
Sourceinit_paths_from(state_from)
Sourcepaths_allowed
Sourcepaths_allowed?(state_from, state_to)
Sourceremove_path(state_from, state_to)
Sourcestate
Sourcestate_default
Sourcetick
Sourcevalid?
Sourcevalidate
Source