Method: I18n::Inflector::API_Strict#tokens_true

Defined in:
lib/i18n-inflector/api_strict.rb

#tokens_true(kind) ⇒ Hash #tokens_true(kind, locale) ⇒ Hash Also known as: true_tokens

Note:

It returns only true tokens, not aliases.

Gets true inflection tokens belonging to a strict kind and their values.

Overloads:

  • #tokens_true(kind) ⇒ Hash

    Gets true inflection tokens (and their values) of the given kind and the current locale.

    Parameters:

    • kind (Symbol, String)

      the kind of inflection tokens to be returned

    Returns:

    • (Hash)

      the hash containing available inflection tokens as keys and their descriptions as values

  • #tokens_true(kind, locale) ⇒ Hash

    Gets true inflection tokens (and their values) of the given kind and locale.

    Parameters:

    • kind (Symbol, String)

      the kind of inflection tokens to be returned

    • locale (Symbol)

      the locale to use

    Returns:

    • (Hash)

      the hash containing available inflection tokens as keys and their descriptions as values

Returns:

  • (Hash)

    the hash containing available inflection tokens and descriptions

Raises:

[View source]

522
523
524
# File 'lib/i18n-inflector/api_strict.rb', line 522

def tokens_true(kind=nil, locale=nil)
  each_token_true(kind, locale).to_h
end