Class: Ting::Tone
- Inherits:
-
Object
- Object
- Ting::Tone
- Defined in:
- lib/ting/tones.rb
Overview
Base class for Tone classes
Direct Known Subclasses
Ting::Tones::Accents, Ting::Tones::Ipa, Ting::Tones::Marks, Ting::Tones::NoTones, Ting::Tones::Numbers, Ting::Tones::Supernum
Constant Summary collapse
- VALID_TONES =
1..5
- MAX_TONE =
NEUTRAL_TONE = 5
Class Method Summary collapse
-
.add_tone(s, t) ⇒ Object
Add a tone to a syllable.
-
.peek_tone(s) ⇒ Object
Determine the tone of a syllable.
-
.pop_tone(s) ⇒ Object
Remove the tone from a syllable.
Class Method Details
.add_tone(s, t) ⇒ Object
Add a tone to a syllable
11 12 13 |
# File 'lib/ting/tones.rb', line 11 def add_tone(s,t) s end |
.peek_tone(s) ⇒ Object
Determine the tone of a syllable
16 17 18 |
# File 'lib/ting/tones.rb', line 16 def peek_tone(s) NEUTRAL_TONE end |
.pop_tone(s) ⇒ Object
Remove the tone from a syllable
21 22 23 |
# File 'lib/ting/tones.rb', line 21 def pop_tone(s) [NEUTRAL_TONE, s] end |