Class: Brut::I18n::HTTPAcceptLanguage::AlwaysEnglish
- Inherits:
-
Brut::I18n::HTTPAcceptLanguage
- Object
- Brut::I18n::HTTPAcceptLanguage
- Brut::I18n::HTTPAcceptLanguage::AlwaysEnglish
- Defined in:
- lib/brut/i18n/http_accept_language.rb
Overview
A subclass that represents the use of English and only English. This is used when attempts to determine the locale fail. Instances of this class are considered "unknown" (#known? returns false), which allows Brut to replace this with a known value later on.
Constant Summary
Constants inherited from Brut::I18n::HTTPAcceptLanguage
Instance Attribute Summary
Attributes inherited from Brut::I18n::HTTPAcceptLanguage
Instance Method Summary collapse
-
#initialize ⇒ AlwaysEnglish
constructor
A new instance of AlwaysEnglish.
-
#known? ⇒ Boolean
Methods inherited from Brut::I18n::HTTPAcceptLanguage
#for_session, from_browser, from_header, from_session, #to_s
Constructor Details
#initialize ⇒ AlwaysEnglish
Returns a new instance of AlwaysEnglish.
109 110 111 |
# File 'lib/brut/i18n/http_accept_language.rb', line 109 def initialize super([ WeightedLocale.new(locale: "en", q: 1) ]) end |
Instance Method Details
#known? ⇒ Boolean
112 |
# File 'lib/brut/i18n/http_accept_language.rb', line 112 def known? = false |