diff options
author | Jochen Topf <jochen@topf.org> | 2012-01-01 14:44:49 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2012-01-01 14:44:49 +0100 |
commit | a5ac86246481bba7fbdd5e5afc4a93d4f9fa0641 (patch) | |
tree | 3b979dcf8b0c571033c20b4097ecfefc5b57ee15 /web/lib | |
parent | 1f939fbdd1f94b18056c05eba14d2e509a5ae32b (diff) | |
download | taginfo-a5ac86246481bba7fbdd5e5afc4a93d4f9fa0641.tar taginfo-a5ac86246481bba7fbdd5e5afc4a93d4f9fa0641.tar.gz |
List table layout cleanup
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/reports.rb | 6 |
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 |