Method: String::Inflections.singular

Defined in:
lib/sequel/extensions/inflector.rb

.singular(rule, replacement) ⇒ Object

Specifies a new singularization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.

Example:

singular(/([^aeiouy]|qu)ies$/i, '\1y')


84
85
86
# File 'lib/sequel/extensions/inflector.rb', line 84

def self.singular(rule, replacement)
  @singulars.insert(0, [rule, replacement])
end