]> source.dussan.org Git - redmine.git/commitdiff
use "do end" instead of {} at lib/redmine/export/pdf/issues_pdf_helper.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 Nov 2020 12:40:25 +0000 (12:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 Nov 2020 12:40:25 +0000 (12:40 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20358 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf/issues_pdf_helper.rb

index 575d3950ada92232c313da59cfa6c5c55f6900db..8fba67f65b38bec185f1162498abe18ccf21265b 100644 (file)
@@ -163,14 +163,14 @@ module Redmine
             pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR")
             pdf.ln
             relations.each do |relation|
-              buf = relation.to_s(issue) {|other|
+              buf = relation.to_s(issue) do |other|
                 text = ""
                 if Setting.cross_project_issue_relations?
                   text += "#{relation.other_issue(issue).project} - "
                 end
                 text += "#{other.tracker} ##{other.id}: #{other.subject}"
                 text
-              }
+              end
               buf = buf.truncate(truncate_length)
               pdf.SetFontStyle('', 8)
               pdf.RDMCell(35+155-60, 5, buf, border_first)
@@ -422,32 +422,32 @@ module Redmine
               return col_width = col_width_avg.map {|w| w * ratio}
             end
           end
-          word_width_max = query.inline_columns.map {|c|
+          word_width_max = query.inline_columns.map do |c|
             n = 10
-            c.caption.split.each {|w|
+            c.caption.split.each do |w|
               x = pdf.get_string_width(w) + col_padding
               n = x if n < x
-            }
+            end
             n
-          }
+          end
 
           #  by properties of issues
           pdf.SetFontStyle('',8)
           k = 1
-          issue_list(issues) {|issue, level|
+          issue_list(issues) do |issue, level|
             k += 1
             values = fetch_row_values(issue, query, level)
-            values.each_with_index {|v,i|
+            values.each_with_index do |v,i|
               n = pdf.get_string_width(v) + col_padding * 2
               col_width_max[i] = n if col_width_max[i] < n
               col_width_min[i] = n if col_width_min[i] > n
               col_width_avg[i] += n
-              v.split.each {|w|
+              v.split.each do |w|
                 x = pdf.get_string_width(w) + col_padding
                 word_width_max[i] = x if word_width_max[i] < x
-              }
-            }
-          }
+              end
+            end
+          end
           col_width_avg.map! {|x| x / k}
 
           # calculate columns width