Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/time-tracker/pluralize.rb

Instance Method Summary collapse

Instance Method Details

#pluralize(count) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/time-tracker/pluralize.rb', line 2

def pluralize(count)
    if count == 1
        "1 #{to_s}"
    else
        "#{count} #{to_s}s"
    end
end