Sha256: d7a1973de9111e359609f4ec55528a27e5fc89410b8878749f04f6cb853ab47b
Contents?: true
Size: 350 Bytes
Versions: 2
Compression:
Stored size: 350 Bytes
Contents
module MultiSync module Mixins module PluralizeHelper def pluralize(n, singular, plural = nil, prefix = true) if n == 1 (prefix ? '1 ' : '') + singular elsif plural (prefix ? "#{n} " : '') + plural else (prefix ? "#{n} " : '') + "#{singular}s" end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
multi_sync-0.0.2 | lib/multi_sync/mixins/pluralize_helper.rb |
multi_sync-0.0.1 | lib/multi_sync/mixins/pluralize_helper.rb |