除了 http://stackoverflow.com/a/6583845 这里的方法:
a_new_class = Class.new(Object) do
  attr_accessor :x
  def initialize(x)
    print #{self.class} initialized with #{x}"
    @x = x
  end
end
SomeModule.const_set("ClassName", a_new_class)
c = ClassName.new(10)
还有什么更好的方法咩?