Module: Ace::Lint::Organisms::ResultReporter::StringHelper

Defined in:
lib/ace/lint/organisms/result_reporter.rb

Overview

Helper module for string operations

Class Method Summary collapse

Class Method Details

.pluralize(word, count) ⇒ String

Pluralize a word based on count

Parameters:

  • word (String)

    Word to pluralize

  • count (Integer)

    Count for pluralization

Returns:

  • (String)

    Singular or plural form



16
17
18
# File 'lib/ace/lint/organisms/result_reporter.rb', line 16

def self.pluralize(word, count)
  (count == 1) ? word : "#{word}s"
end