summaryrefslogtreecommitdiff
path: root/testapp/exam/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/exam/registry.py')
-rw-r--r--testapp/exam/registry.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/testapp/exam/registry.py b/testapp/exam/registry.py
new file mode 100644
index 0000000..ef995ac
--- /dev/null
+++ b/testapp/exam/registry.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+class Registry(object):
+ def __init__(self):
+ self._registry = {}
+
+ def get_class(self, language):
+ return self._registry[language]
+
+ def register(self, language, cls):
+ self._registry[language] = cls
+
+
+registry = Registry() \ No newline at end of file