convert_value

convert_value(value, options = {}) Instance Protected methods

instance

instance(locale = :en) Class Public methods

new

new() Class Public methods

acronym

acronym(word) Instance Public methods Specifies a new acronym. An acronym must be specified as it will appear in a camelized string. An underscore string that contains the acronym will retain the acronym when passed to camelize, humanize, or titleize. A camelized string that contains the acronym will maintain the acronym when titleized or humanized, and will convert the acronym into a non-delimited single lowercase word when passed to underscore. acronym 'HTML' titleize 'html'

clear

clear(scope = :all) Instance Public methods Clears the loaded inflections within a given scope (default is :all). Give the scope as a symbol of the inflection type, the options are: :plurals, :singulars, :uncountables, :humans. clear :all clear :plurals

human

human(rule, replacement) Instance Public methods Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name'). human /_cnt$/i, '\1_count' human 'legacy_col_person_name', 'Name'

irregular

irregular(singular, plural) Instance Public methods Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form. irregular 'octopus', 'octopi' irregular 'person', 'people'

plural

plural(rule, replacement) Instance Public methods Specifies a new pluralization 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.

singular

singular(rule, replacement) Instance Public methods 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.

uncountable

uncountable(*words) Instance Public methods Add uncountable words that shouldn't be attempted inflected. uncountable 'money' uncountable 'money', 'information' uncountable %w( money information rice )