class Smcr::StateMachine(State)

Included Modules

Defined in:

smcr/state_machine.cr

Constant Summary

ERROR_KEY_PATHS_ALLOWED = "paths_allowed"

STATE_NOT_SET = :state_not_set

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
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) #

[View source]

Class Method Detail

def self.state_class #

[View source]
def self.state_internal_values #

[View source]
def self.state_names #

[View source]
def self.state_values #

[View source]

Instance Method Detail

def add_path(state_from, state_to) #

[View source]
def errors : CurrentErrors #

[View source]
def history : StateChangeHistory #

[View source]
def history_size : HistorySize #

[View source]
def init_paths #

[View source]
def init_paths_from(state_from) #

[View source]
def paths_allowed : PathsAllowed #

[View source]
def paths_allowed?(state_from, state_to) #

[View source]
def remove_path(state_from, state_to) #

[View source]
def state : State #

[View source]
def state_default : State #

[View source]
def tick : Tick #

[View source]
def valid? #

[View source]
def validate #

[View source]