OSDN Git Service

fix profiler extend system
[pettanr/pettanr.git] / lib / locmare / profiler.rb
index 1542627..6f1c738 100644 (file)
@@ -11,17 +11,28 @@ module Locmare
       @item = item
       @operators = operators
       # feasible show parsed extend data
-      @item.boost 'post'
+      @item.boosts 'post'
       
       @profiler_manifest = LocalManifest.manifest.profilers[@item_name]
       @template_dir = 'templates/r/profiler/'
       @header = Header.new self
-      @columns = @profiler_manifest.column_names.map {|column_name|
-        Column.new self, column_name
+      @columns = {}
+      @profiler_manifest.columns.each {|name, column|
+        @columns[name] = Column.factory self, column
       }
       @associations = Association.new self, @profiler_manifest.associations
     end
     
+    def each_column
+      @profiler_manifest.column_names.each {|column_name|
+        yield @columns[column_name]
+      }
+    end
+    
+    def peta
+      Manifest.manifest.items[@item_name]
+    end
+    
     def model
       ::Manifest::item_name_to_model @item_name
     end