Created
July 25, 2010 17:44
-
-
Save jhchabran/489718 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
Usine := Object clone do ( | |
/* (...) */ | |
create := method (factory, | |
dummy := factories getSlot(factory) clone | |
parentProto := dummy protos first | |
parentProto slotNames foreach(slotName, | |
value := nil | |
if(parentProto getSlot(slotName) type == "Suite", | |
if(suites getSlot(slotName), | |
value = suites getSlot(slotName) + 1 | |
suites setSlot(slotName, value) | |
, | |
value = suites setSlot(slotName, 0) | |
) | |
dummy setSlot(slotName, dummy getSlot(slotName) eval(value)) | |
) | |
) | |
dummy | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment