Class: Ting::Tone

Inherits:
Object
  • Object
show all
Defined in:
lib/ting/tones.rb

Overview

Base class for Tone classes

Constant Summary collapse

VALID_TONES =
1..5
MAX_TONE =
NEUTRAL_TONE = 5

Class Method Summary collapse

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