module

ActiveSupport::Inflector

Constants

IRREGULARS = {"person" => "people", "man" => "men", "child" => "children", "sex" => "sexes", "move" => "moves"}
PLURAL_RULES = {/(s)tudy$/ => "\\1tudies", /(matr)ix$/ => "\\1ices", /(vert|ind)ex$/ => "\\1ices", /(x|ch|ss|sh)$/ => "\\1es", /([^aeiouy]|qu)y$/ => "\\1ies", /(?:([^f])fe|([lr])f)$/ => "\\1\\2ves", /(hive)$/ => "\\1s", /([^o])o$/ => "\\1oes", /(.*)$/ => "\\1s"}
SINGULAR_RULES = {/(matr)ices$/ => "\\1ix", /(vert|ind)ices$/ => "\\1ex", /(x|ch|ss|sh)es$/ => "\\1", /([^aeiouy]|qu)ies$/ => "\\1y", /(hive)s$/ => "\\1", /([^o])oes$/ => "\\1o", /(tive)s$/ => "\\1", /([lr])ves$/ => "\\1f", /(^analy)ses$/ => "\\1sis", /(analy)ses$/ => "\\1sis", /s$/ => ""}
UNCOUNTABLES = ["equipment", "information", "rice", "money", "species", "series", "fish", "sheep", "jeans", "police"] of ::String

Class methods

camelize(term : String) : String
Source
pluralize(word : String) : String
Source
singularize(word : String) : String
Source
underscore(camel : String) : String
Source