Sha256: a3bc3169905a8633fddf9778fa2e01ed127e6d004bb5a834522edeffaec856f2
Contents?: true
Size: 329 Bytes
Versions: 2
Compression:
Stored size: 329 Bytes
Contents
# frozen_string_literal: true 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-5.2.0 | lib/generators/locale/base.rb |
active_generator-5.1.0 | lib/generators/locale/base.rb |