Commit 77615e21 authored by Florent Didier's avatar Florent Didier
Browse files

[dev] mw_utils.rb: add pluralize method

parent 3fe21cc2
......@@ -76,6 +76,10 @@ module G5K
(x.to_f / 10**9).floor.to_s + ' Gbps'
end
end
def self.pluralize(count, word)
return (count == 1 || word[-1] == 's') ? word : word + 's'
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment