Sha256: 2742e10a148bcca195129adcb7627f0ecbc09a8115d32055b379e9fb40e9d403
Contents?: true
Size: 611 Bytes
Versions: 1
Compression:
Stored size: 611 Bytes
Contents
require_relative "numeric_value/constants" module Unicode module NumericValue def self.numeric_value(char) codepoint = char.unpack("U")[0] or raise(ArgumentError, "Unicode::NumericValue.numeric_value must be given a valid char") require_relative "numeric_value/index" unless defined? ::Unicode::NumericValue::INDEX INDEX[codepoint] end class << self; alias of numeric_value; end def self.chars require_relative "numeric_value/index" unless defined? ::Unicode::NumericValue::INDEX INDEX.keys.map{ |codepoint| [codepoint].pack("U") } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unicode-numeric_value-1.0.0 | lib/unicode/numeric_value.rb |