Sha256: e20e3dafe1220cbb7ae12ed006c9ad1f03f09cd234e333cb0bd81062a8a793d1
Contents?: true
Size: 296 Bytes
Versions: 2
Compression:
Stored size: 296 Bytes
Contents
module Locale module Base private def assert_valid_language! unless [2, 4, 5, 6].include?(language.size) && (language =~ /^[A-Za-z-]+$/) raise ArgumentError, "Unknown language format: '#{language}'. Valid format example is: 'en'" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_generator-1.0.1 | lib/generators/locale/base.rb |
active_generator-1.0.0 | lib/generators/locale/base.rb |