Module: Strings::Inflection::Nouns

Defined in:
lib/strings/inflection/nouns.rb

Class Method Summary collapse

Class Method Details

.pluralsArray[String]

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

A list of plural rules

Returns:

  • (Array[String])


709
710
711
# File 'lib/strings/inflection/nouns.rb', line 709

def plurals
  @plurals
end

.singularsArray[String]

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

A list of singular rules

Returns:

  • (Array[String])


699
700
701
# File 'lib/strings/inflection/nouns.rb', line 699

def singulars
  @singulars
end

.to_stem(list, suffix) ⇒ Array[String]

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Remove suffix from a word

Returns:

  • (Array[String])

    a list of all stems without suffixes



12
13
14
# File 'lib/strings/inflection/nouns.rb', line 12

def self.to_stem(list, suffix)
  list.map { |word| word[0...-suffix.size] }
end

.uncountableArray[String]

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

A set of uncoutanble nouns

Returns:

  • (Array[String])


689
690
691
# File 'lib/strings/inflection/nouns.rb', line 689

def uncountable
  @uncountable
end