class Analects::Models::Zi

Constants

ANTIREGEXP
RANGES
REGEXP

Regexp that matches a single CJK character

Public Class Methods

codepoint_ranges() click to toggle source
# File lib/analects/models/zi.rb, line 40
def self.codepoint_ranges
  RANGES.values.map{|v| v[:range]}
end
each_radical(&block) click to toggle source
# File lib/analects/models/zi.rb, line 57
def self.each_radical(&block)
  RANGES[:kangxi_radicals][:range].each do |codepoint|
    block.([codepoint].pack('U'))
  end
end