Sha256: 90b49f6f63ebb5a96b86a93331c029aae3a9e729ab9bd6c1d3bba67d52a44fb4
Contents?: true
Size: 616 Bytes
Versions: 13
Compression:
Stored size: 616 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.sort.map{ |codepoint| [codepoint].pack("U") } end end end
Version data entries
13 entries across 13 versions & 1 rubygems