class

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)
Source
new(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)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

state_class
Source
state_internal_values
Source
state_names
Source
state_values
Source

Instance methods

add_path(state_from, state_to)
Source
errors
Source
history
Source
history_size
Source
init_paths
Source
init_paths_from(state_from)
Source
paths_allowed
Source
paths_allowed?(state_from, state_to)
Source
remove_path(state_from, state_to)
Source
state
Source
state_default
Source
tick
Source
valid?
Source
validate
Source