module Unicode::NumericValue

Constants

DATA_DIRECTORY
INDEX
INDEX_FILENAME
UNICODE_VERSION
VERSION

Public Class Methods

chars() click to toggle source
# File lib/unicode/numeric_value.rb, line 13
def self.chars
  require_relative "numeric_value/index" unless defined? ::Unicode::NumericValue::INDEX
  INDEX.keys.sort.map{ |codepoint| [codepoint].pack("U") }
end
numeric_value(char) click to toggle source
# File lib/unicode/numeric_value.rb, line 5
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
Also aliased as: of
of(char)
Alias for: numeric_value