Module: ZhongwenTools::Romanization::WadeGiles
- Defined in:
- lib/zhongwen_tools/romanization/wade_giles.rb
Class Method Summary collapse
Class Method Details
.split(str) ⇒ Object
16 17 18 19 |
# File 'lib/zhongwen_tools/romanization/wade_giles.rb', line 16 def self.split(str) regex = /(#{ ZhongwenTools::Romanization.detect_regex(:wg) }*)/ ZhongwenTools::Romanization.split_romanization(str, regex) end |
.to_wg(*args) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/zhongwen_tools/romanization/wade_giles.rb', line 4 def self.to_wg(*args) str, from = args from ||= ZhongwenTools::Romanization.romanization?(str) ZhongwenTools::Romanization.convert str, :wg, from.to_sym end |
.wg?(str) ⇒ Boolean
11 12 13 14 |
# File 'lib/zhongwen_tools/romanization/wade_giles.rb', line 11 def self.wg?(str) regex = ZhongwenTools::Romanization.detect_regex(:wg) ZhongwenTools::Romanization.detect_romanization(str, regex) end |