def create_class(super_class) Class.new(super_class) do def who_am_i puts "Ich bin ein Kind von #{self.class.superclass}" end end end Test = create_class(Object) t = Test.new t.who_am_i