summaryrefslogtreecommitdiffstats
path: root/lib/redmine/helpers
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 13:32:59 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 13:32:59 +0000
commitcb2d4068e8294d9ca31578b2f07b130751b98471 (patch)
tree34440c4cf583bd561c5c91470b6ce9325f13cae5 /lib/redmine/helpers
parentb0b03c97c5530b33fff39098647d318492b1c55e (diff)
downloadredmine-cb2d4068e8294d9ca31578b2f07b130751b98471.tar.gz
redmine-cb2d4068e8294d9ca31578b2f07b130751b98471.zip
code cleanup: rubocop: fix Lint/IneffectiveAccessModifier in lib/redmine/helpers/gantt.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18776 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers')
-rw-r--r--lib/redmine/helpers/gantt.rb33
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 2258faf9c..db0676ba7 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -667,23 +667,26 @@ module Redmine
start_date + (end_date - start_date + 1) * (progress / 100.0)
end
- def self.sort_issues!(issues)
- issues.sort_by! {|issue| sort_issue_logic(issue)}
- end
+ # Singleton class method is public
+ class << self
+ def sort_issues!(issues)
+ issues.sort_by! {|issue| sort_issue_logic(issue)}
+ end
- def self.sort_issue_logic(issue)
- julian_date = Date.new()
- ancesters_start_date = []
- current_issue = issue
- begin
- ancesters_start_date.unshift([current_issue.start_date || julian_date, current_issue.id])
- current_issue = current_issue.parent
- end while (current_issue)
- ancesters_start_date
- end
+ def sort_issue_logic(issue)
+ julian_date = Date.new()
+ ancesters_start_date = []
+ current_issue = issue
+ begin
+ ancesters_start_date.unshift([current_issue.start_date || julian_date, current_issue.id])
+ current_issue = current_issue.parent
+ end while (current_issue)
+ ancesters_start_date
+ end
- def self.sort_versions!(versions)
- versions.sort!
+ def sort_versions!(versions)
+ versions.sort!
+ end
end
def pdf_new_page?(options)