Method: I18n::Inflector::InflectionData#get_target_for_alias

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

#get_target_for_alias(alias_name) ⇒ Symbol? #get_target_for_alias(alias_name, kind) ⇒ Symbol?

Gets a target token for the alias.

Overloads:

  • #get_target_for_alias(alias_name) ⇒ Symbol?

    Gets a target token for the alias.

    Parameters:

    • alias_name (Symbol)

      the identifier of an alias

    Returns:

    • (Symbol, nil)

      the token that the given alias points to or nil if it isn’t really an alias

  • #get_target_for_alias(alias_name, kind) ⇒ Symbol?

    Gets a target token for the alias that’s kind is given.

    Parameters:

    • alias_name (Symbol)

      the identifier of an alias

    • kind (Symbol)

      the identifier of a kind

    Returns:

    • (Symbol, nil)

      the token that the given alias points to or nil if it isn’t really an alias

Returns:

  • (Symbol, nil)

    the token that the given alias points to or nil if it isn’t really an alias

[View source]

265
266
267
# File 'lib/i18n-inflector/inflection_data.rb', line 265

def get_target_for_alias(alias_name, kind=nil)
  @tokens[alias_name][:target]
end