Method: I18n::Inflector::InflectionData#get_true_token
- Defined in:
- lib/i18n-inflector/inflection_data.rb
permalink #get_true_token(token) ⇒ Symbol? #get_true_token(token, kind) ⇒ Symbol?
Note:
If the given token
is really an alias it will be resolved and the real token pointed by that alias will be returned.
Gets a true token for the given identifier.
311 312 313 314 315 316 317 318 |
# File 'lib/i18n-inflector/inflection_data.rb', line 311 def get_true_token(token, kind=nil) o = @tokens[token] k = o[:kind] return nil if k.nil? r = (o[:target] || token) return r if kind.nil? k == kind ? r : nil end |