class Ting::Tones::Marks
Constants
- GLYPHS
Public Class Methods
add_tone(syll,tone)
click to toggle source
# File lib/ting/tones/marks.rb, line 10 def add_tone(syll,tone) syll + GLYPHS[normalize(tone) % 5] end
peek_tone(syll)
click to toggle source
# File lib/ting/tones/marks.rb, line 14 def peek_tone(syll) case syll when /ˊ/ 2 when /ˇ/ 3 when /ˋ/ 4 when /˙/ NEUTRAL_TONE else 1 end end
pop_tone(syll)
click to toggle source
# File lib/ting/tones/marks.rb, line 29 def pop_tone(syll) [ peek_tone(syll), syll[/\A[^#{GLYPHS.join}]+/] ] end