manveru (owner)

Revisions

gist: 98926 Download_button fork
public
Public Clone URL: git://gist.github.com/98926.git
Embed All Files: show embed
foo.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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