1 require_dependency "locmare/profiler/association/belongs_to"
2 require_dependency "locmare/profiler/association/has_many"
3 require_dependency "locmare/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
13 @belongs_to = @association_manifest.belongs_to.map {|belongs_to_manifest|
14 BelongsTo.new self, belongs_to_manifest
16 @has_many = @association_manifest.has_many.map {|list_name|
17 HasMany.new self, list_name
19 @has_one = @association_manifest.has_one.map {|list_name|
20 HasOne.new self, list_name
29 ::Manifest.manifest.models[@profiler.item_name]
32 def model_attribute_manifest
33 model_manifest.attributes[@column_name]
37 @profiler.template_dir
40 def template_file_name
45 self.template_dir + self.template_file_name
48 def each_belongs_to_filer
54 def each_has_many_filer
60 def each_has_one_filer