1 require_dependency "local_manifest/profiler/column"
2 require_dependency "local_manifest/profiler/list"
3 require_dependency "local_manifest/profiler/association"
7 def self.manager manifest, my_manifests
9 my_manifests.each {|item_name, profiler_manifest|
10 profilers[item_name] = self.new(manifest, item_name, profiler_manifest)
15 attr :profiler_manifest, :item_name, :manifest,
16 :column_names, :lists, :associations
17 def initialize manifest, item_name, profiler_manifest
19 @item_name = item_name
20 @profiler_manifest = profiler_manifest
26 @profiler_manifest['column_names'] ||= []
27 @profiler_manifest['lists'] ||= {}
28 @profiler_manifest['associations'] ||= {}
32 @column_names = ['id'] + @profiler_manifest['column_names'] + ['created_at', 'updated_at']
34 @profiler_manifest['lists'].each {|list_name, list_manifest|
35 @lists[list_name] = ProfilerModule::List.new(self, list_name, list_manifest)
37 @associations = ProfilerModule::Association.new(self, @profiler_manifest['associations'])