Sha256: 855e533c6ab8bcd66d22da7e5cf61af64104f964693fb51aca6b11b9a9f79502

Contents?: true

Size: 297 Bytes

Versions: 2

Compression:

Stored size: 297 Bytes

Contents

module Locale
  module Base

    private

    def assert_valid_language!
      return if [2, 4, 5, 6].include?(language.size) && /^[A-Za-z-]+$/.match?(language)
      raise ArgumentError,
            "Unknown language format: #{language.inspect}. Valid format example is: 'en'"
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_generator-4.0.6 lib/generators/locale/base.rb
active_generator-4.0.5 lib/generators/locale/base.rb