Sha256: cc1122f11d556b4ad4603915597f5cb417d366f87c537729e524fac3c341a968

Contents?: true

Size: 522 Bytes

Versions: 27

Compression:

Stored size: 522 Bytes

Contents

class Lalala::ExtI18n::TestNegotiationAdapter < Lalala::ExtI18n::NegotiationAdapter

  def initialize(default_locale, available_locales)
    @default_locale    = default_locale
    @available_locales = available_locales.values.flatten.compact.uniq
    @domain_locales    = available_locales
  end

  def default_locale
    @default_locale
  end

  def available_locales
    @available_locales
  end

  def locales_for_hostname(hostname)
    @domain_locales[hostname]
  end

  def allow_accept_language
    true
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
lalala-4.1.0.dev.392 lib/lalala/ext_i18n/test_negotiation_adapter.rb
lalala-4.0.0.dev.393 lib/lalala/ext_i18n/test_negotiation_adapter.rb
lalala-4.1.0.dev.391 lib/lalala/ext_i18n/test_negotiation_adapter.rb
lalala-4.1.0.dev.390 lib/lalala/ext_i18n/test_negotiation_adapter.rb
lalala-4.1.0.dev.389 lib/lalala/ext_i18n/test_negotiation_adapter.rb
lalala-4.0.0.dev.388 lib/lalala/ext_i18n/test_negotiation_adapter.rb
lalala-4.1.0.dev.387 lib/lalala/ext_i18n/test_negotiation_adapter.rb