summaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-01-01 14:44:49 +0100
committerJochen Topf <jochen@topf.org>2012-01-01 14:44:49 +0100
commita5ac86246481bba7fbdd5e5afc4a93d4f9fa0641 (patch)
tree3b979dcf8b0c571033c20b4097ecfefc5b57ee15 /web/lib
parent1f939fbdd1f94b18056c05eba14d2e509a5ae32b (diff)
downloadtaginfo-a5ac86246481bba7fbdd5e5afc4a93d4f9fa0641.tar
taginfo-a5ac86246481bba7fbdd5e5afc4a93d4f9fa0641.tar.gz
List table layout cleanup
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/reports.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/lib/reports.rb b/web/lib/reports.rb
index e04b9b7..14cf6a8 100644
--- a/web/lib/reports.rb
+++ b/web/lib/reports.rb
@@ -11,6 +11,12 @@ class Report
end
end
+ def self.each_with_index
+ @@reports.sort_by{ |report| report.title }.each_with_index do |report, idx|
+ yield report, idx
+ end
+ end
+
def initialize(title, *sources)
@@reports << self
@title = title