Skip to content

Instantly share code, notes, and snippets.

@manveru
Created April 21, 2009 04:07
Show Gist options
  • Save manveru/98926 to your computer and use it in GitHub Desktop.
Save manveru/98926 to your computer and use it in GitHub Desktop.
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