Created
February 13, 2012 06:18
-
-
Save alloy-d/1814205 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 Stateful | |
class PostconditionFailed < RuntimeError; end | |
class NoAvailableTransition < RuntimeError; end | |
class State | |
def initialize(opts={}) | |
@pre = opts[:pre] | |
@post = opts[:post] | |
@proc = opts[:proc] | |
@transitions = opts[:transitions] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment