Sha256: db54032c7784a2ec7c8eeb326f8da375d87a28258071259a61ed5d636815ea71

Contents?: true

Size: 305 Bytes

Versions: 5

Compression:

Stored size: 305 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.inspect}. Valid format example is: 'en'"
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_generator-4.0.4 lib/generators/locale/base.rb
active_generator-4.0.3 lib/generators/locale/base.rb
active_generator-4.0.2 lib/generators/locale/base.rb
active_generator-4.0.1 lib/generators/locale/base.rb
active_generator-4.0.0 lib/generators/locale/base.rb