Created
August 12, 2010 14:19
-
-
Save trotter/521030 to your computer and use it in GitHub Desktop.
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
| # Module w/ common states | |
| module CommonStates | |
| def answering_phones | |
| state :answering_phones do | |
| transitions_to :going_home, :if => :after_five?, :trigger => :shutdown_computer | |
| end | |
| end | |
| end | |
| # In your actual class | |
| class OfficeWorker | |
| include Newflow | |
| define_workflow do | |
| extend CommonStates | |
| answering_phones | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment