Sha256: 48e64f10c52a170005f676d23a395a1dc48695249aebd44a79cf21cbd1026da2
Contents?: true
Size: 398 Bytes
Versions: 6849
Compression:
Stored size: 398 Bytes
Contents
# frozen_string_literal: true module RuboCop module Formatter # Common logic for UI texts. module TextUtil module_function def pluralize(number, thing, options = {}) if number.zero? && options[:no_for_zero] "no #{thing}s" elsif number == 1 "1 #{thing}" else "#{number} #{thing}s" end end end end end
Version data entries
6,849 entries across 6,810 versions & 50 rubygems