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