1 require_dependency "manifest/profiler/association/belongs_to"
2 require_dependency "manifest/profiler/association/has_many"
3 require_dependency "manifest/profiler/association/has_one"
7 include AssociationModule
8 attr :profiler, :association_manifest,
9 :belongs_to, :has_many, :has_one
10 def initialize profiler, association_manifest
12 @association_manifest = association_manifest
18 @association_manifest['belongs_to'] ||= []
19 @association_manifest['has_many'] ||= []
20 @association_manifest['has_one'] ||= []
27 @association_manifest['belongs_to'].each {|model_name|
28 @belongs_to << BelongsTo.new(self, model_name)
30 @association_manifest['has_many'].each {|list_name|
31 @has_many << HasMany.new(self, list_name)
33 @association_manifest['has_one'].each {|list_name|
34 @has_one << HasOne.new(self, list_name)
43 @profiler.profiler_manifest