I don't know how Ruby mixins works, and i'm not sure how Moose/Moo implement it exactly, but i know that it's possible to have each Door be in a different state. Because that is what apply_all_roles_to($object, @roles) is for: it does not apply to the whole class, but only to one object.
I have no idea about the scalability. I think that Salva made a good point: if it gets that complicated, i'll probably want to re-think my design.
In reply to Re^8: a State machine with Roles - possible? (class or instance)
by mascip
in thread a State machine with Roles - possible?
by mascip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |