Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 77615e21 authored by Florent Didier's avatar Florent Didier
Browse files

[dev] mw_utils.rb: add pluralize method

parent 3fe21cc2
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,10 @@ module G5K ...@@ -76,6 +76,10 @@ module G5K
(x.to_f / 10**9).floor.to_s + ' Gbps' (x.to_f / 10**9).floor.to_s + ' Gbps'
end end
end end
def self.pluralize(count, word)
return (count == 1 || word[-1] == 's') ? word : word + 's'
end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment