Method: I18n::Inflector::API_Strict#has_token?
- Defined in:
- lib/i18n-inflector/api_strict.rb
permalink #has_token?(token, kind) ⇒ Boolean #has_token?(token, kind, locale) ⇒ Boolean Also known as: token_exists?
Checks if the given token
belonging to a strict kind exists. It may be an alias or a true token.
312 313 314 315 316 |
# File 'lib/i18n-inflector/api_strict.rb', line 312 def has_token?(*args) token, kind, locale = tkl_args(args) return false if (token.nil? || kind.nil?) data_safe(locale).has_token?(token, kind) end |