Module: ZhongwenTools::Conversion

Extended by:
Conversion
Included in:
Conversion, String
Defined in:
lib/zhongwen_tools/conversion.rb

Constant Summary collapse

ZH_TYPES =
{
  :zht => [0],
  :zhs => [1],
  :zhtw => [2,0],
  :zhhk => [3,0],
  :zhcn => [4,1]
}
ZH_CONVERSION_TABLE =
[]

Instance Method Summary collapse

Instance Method Details

#to_zhcn(str = nil) ⇒ Object



33
34
35
36
37
# File 'lib/zhongwen_tools/conversion.rb', line 33

def to_zhcn(str = nil)
  str ||= self

  convert(:zhcn, str)
end

#to_zhhk(str = nil) ⇒ Object



27
28
29
30
31
# File 'lib/zhongwen_tools/conversion.rb', line 27

def to_zhhk(str = nil)
  str ||= self

  convert(:zhhk, str)
end

#to_zhs(str = nil) ⇒ Object



9
10
11
12
13
# File 'lib/zhongwen_tools/conversion.rb', line 9

def to_zhs(str = nil)
  str ||= self

  convert(:zhs, str)
end

#to_zht(str = nil) ⇒ Object



15
16
17
18
19
# File 'lib/zhongwen_tools/conversion.rb', line 15

def to_zht(str = nil)
  str ||= self

  convert(:zht, str)
end

#to_zhtw(str = nil) ⇒ Object



21
22
23
24
25
# File 'lib/zhongwen_tools/conversion.rb', line 21

def to_zhtw(str = nil)
  str ||= self

  convert(:zhtw, str)
end