Sha256: 8c3f8a4e11a24e20b1ec623fe7d03be6039271012efb393d212e6dead54c33b3
Contents?: true
Size: 433 Bytes
Versions: 11
Compression:
Stored size: 433 Bytes
Contents
# encoding: utf-8 module RuboCop module Formatter # Common logic for UI texts. module TextUtil module_function def pluralize(number, thing, options = {}) text = if number == 0 && options[:no_for_zero] 'no' else number.to_s end text << " #{thing}" text << 's' unless number == 1 text end end end end
Version data entries
11 entries across 11 versions & 1 rubygems