Method: I18n::Inflector::API_Strict#tokens_raw

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

#tokens_raw(kind) ⇒ Hash #tokens_raw(kind, locale) ⇒ Hash Also known as: raw_tokens

Note:

You may deduce whether the returned values are aliases or true tokens by testing if a value is a kind of Symbol or a String.

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

Overloads:

  • #tokens_raw(kind) ⇒ Hash

    Gets available 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; in case of aliases the returned values are Symbols

  • #tokens_raw(kind, locale) ⇒ Hash

    Gets available 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. In case of aliases the returned values are Symbols

Returns:

  • (Hash)

    the hash containing available inflection tokens and descriptions (or alias pointers)

Raises:

[View source]

473
474
475
# File 'lib/i18n-inflector/api_strict.rb', line 473

def tokens_raw(kind=nil, locale=nil)
  each_token_raw(kind, locale).to_h
end