summaryrefslogtreecommitdiff
path: root/lib/oxidized/source/source.rb
blob: 93c9b6fd931eb7cb4f5198befc2e7520eae80723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Oxidized
  class Source
    class NoConfig < OxidizedError; end
    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