Created
April 6, 2016 12:48
-
-
Save ffloyd/cd11137ce21d2bf0b7ab2118754cfe69 to your computer and use it in GitHub Desktop.
statesman
This file contains 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
# use only for possible transitions check | |
class IndividualWebinar::Workflow | |
include Statesman::Machine | |
def initialize(webinar) | |
@webinar = webinar | |
end | |
state :planned | |
state :waiting_for_teacher | |
state :waiting_for_student | |
state :on_air | |
state :finished | |
transition from: :planned, to: [:waiting_for_teacher, :cancelled_by_manager, :cancelled_by_teacher, :cancelled_by_student] | |
transition from: :waiting_for_teacher, to: [:waiting_for_student, :missed_by_teacher] | |
transition from: :waiting_for_student, to: [:on_air, :missed_by_student] | |
transition from: :on_air, to: [:finished] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment