Created
June 7, 2011 09:36
-
-
Save mvr/1011955 to your computer and use it in GitHub Desktop.
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
module Temporary | |
include Behaviour | |
def setup | |
Timer.in lifetime do | |
World.remove self | |
end | |
end | |
def lifetime | |
@lifetime or raise "Temporary objects must have a lifetime!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment