Method: I18n::Inflector::InflectionData#has_token?
- Defined in:
- lib/i18n-inflector/inflection_data.rb
permalink #has_token(token) ⇒ Boolean #has_token(token, kind) ⇒ Boolean
Tests if a token (or alias) is present.
117 118 119 120 |
# File 'lib/i18n-inflector/inflection_data.rb', line 117 def has_token?(token, kind=nil) k = @tokens[token][:kind] kind.nil? ? !k.nil? : k == kind end |