Open stephannv opened 1 year ago
Useful from the perspective of refactoring and finding the usage, as in our codebase some of the states from different state machines are equally named. The main question should it be a symbol or a string. And what about the case, when the constant name is already defined? Should it redefine it quietly, raise an error or show a message while the application boots?!
@dmitry following .initial_state
, #current_state
, .states
return type, it should be a string. About constant name conflict, I think it should just warn user about it.
Would be nice if
.state
method defined a constant using the state name. eg.:This way we can detect typos and changed states early:
What do you think? Would this be useful for more people?