Class: CJKChar

Inherits:
String
  • Object
show all
Defined in:
lib/cjk_string.rb

Instance Method Summary collapse

Instance Method Details

#codepointObject



30
31
32
# File 'lib/cjk_string.rb', line 30

def codepoint
  codepoints.first
end

#unicode_rangeObject



20
21
22
23
24
# File 'lib/cjk_string.rb', line 20

def unicode_range
  Analects::Models::Zi::RANGES.each do |name, info|
    return name if info[:range].include? codepoint
  end
end

#unicode_range_nameObject



26
27
28
# File 'lib/cjk_string.rb', line 26

def unicode_range_name
  Analects::Models::Zi::RANGES[unicode_range][:name]
end