Created
June 13, 2014 07:45
-
-
Save Martin91/f64d1de98cb34b09defe to your computer and use it in GitHub Desktop.
state_machine dynamical initial state require states list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://stackoverflow.com/a/23497743 | |
state_machine :state, initial: ->(t) { t.active? ? :seeking_flesh : :dormant } do | |
state :dormant, :seeking_flesh, :attacking # this must be present | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment