Sha256: 9c18b91dac826f4be4054134761779ead0c33a017a476b43c4592f21905a7b6d
Contents?: true
Size: 494 Bytes
Versions: 1
Compression:
Stored size: 494 Bytes
Contents
require_relative "age/version" module Unicode module Age KNOWN_UNICODE_VERSIONS = [ 1.1, 2.0, 2.1, 3.0, 3.1, 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, 6.0, 6.1, 6.2, 6.3, 7.0, 8.0, ].freeze def self.of(string) return nil if string =~ /\A\p{Unassigned}*\z/ KNOWN_UNICODE_VERSIONS.find{ |uv| string =~ Regexp.compile('\A\p{age=%.1f}*\z' % uv) } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unicode-age-1.0.0 | lib/unicode/age.rb |