Created
April 21, 2009 04:07
-
-
Save manveru/98926 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
class AttribBase | |
def initialize | |
eval($initLine) | |
end | |
end | |
module ConstExtend | |
def const_missing(name) | |
const = const_set(name, Class.new(AttribBase)) | |
const.extend(ConstExtend) | |
const | |
end | |
end | |
class Connectors < AttribBase | |
extend ConstExtend | |
p External | |
p Power::PC | |
p PS2::KEYBOARD | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment