Module: BundleUpdateInteractive::StringHelper

Included in:
CLI::MultiSelect
Defined in:
lib/bundle_update_interactive/string_helper.rb

Class Method Summary collapse

Class Method Details

.pluralize(count, singular, plural = nil) ⇒ Object



6
7
8
9
# File 'lib/bundle_update_interactive/string_helper.rb', line 6

def pluralize(count, singular, plural=nil)
  plural ||= "#{singular}s"
  "#{count} #{count == 1 ? singular : plural}"
end