class Smcr::StateMachine(State)
- Smcr::StateMachine(State)
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
smcr/state_machine.crConstant Summary
-
ERROR_KEY_PATHS_ALLOWED =
"paths_allowed"
-
STATE_NOT_SET = :state_not_set
Constructors
- .new(pull : JSON::PullParser)
- .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)
Class Method Summary
Instance Method Summary
- #add_path(state_from, state_to)
- #errors : CurrentErrors
- #history : StateChangeHistory
- #history_size : HistorySize
- #init_paths
- #init_paths_from(state_from)
- #paths_allowed : PathsAllowed
- #paths_allowed?(state_from, state_to)
- #remove_path(state_from, state_to)
- #state : State
- #state_default : State
- #tick : Tick
- #valid?
- #validate
Constructor Detail
def self.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)
#