summaryrefslogtreecommitdiff
path: root/lib/oxidized/source/source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/source/source.rb')
-rw-r--r--lib/oxidized/source/source.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/oxidized/source/source.rb b/lib/oxidized/source/source.rb
new file mode 100644
index 0000000..f5976a0
--- /dev/null
+++ b/lib/oxidized/source/source.rb
@@ -0,0 +1,15 @@
+module Oxidized
+ class Source
+ class << self
+ def inherited klass
+ Oxidized.mgr.loader = { :class => klass }
+ end
+ end
+ def initialize
+ @map = (CFG.model_map or {})
+ end
+ def map_model model
+ @map.key?(model) ? @map[model] : model
+ end
+ end
+end