Skip to content

Instantly share code, notes, and snippets.

@djcsdy
Created September 6, 2012 10:07
Show Gist options
  • Save djcsdy/3654273 to your computer and use it in GitHub Desktop.
Save djcsdy/3654273 to your computer and use it in GitHub Desktop.
class Idiocy {
function doSomethingHatstand(o:Object) {
// do something preposterous
}
function doSomethingLampshade(o:Object) {
// do something asinine
}
public function doSomething(o:Object) {
this["doSomething" + o.type](o); // o.type is either "Hatstand" or "Lampshade" (or the program crashes)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment