Class: CodyRobbins::Syllabify
- Inherits:
-
Object
- Object
- CodyRobbins::Syllabify
- Defined in:
- lib/cody_robbins/syllabify.rb,
lib/cody_robbins/syllabify/syllable.rb
Defined Under Namespace
Classes: Syllable
Instance Method Summary collapse
-
#initialize(language, transcription) ⇒ Syllabify
constructor
Create a new syllabified representation of an IPA transcription.
-
#syllables ⇒ Array
Return the individual Syllable objects representing the transcription’s syllables.
-
#to_s ⇒ String
Render a syllabified IPA transcription of the input transcription.
Constructor Details
#initialize(language, transcription) ⇒ Syllabify
Create a new syllabified representation of an IPA transcription.
17 18 19 20 21 |
# File 'lib/cody_robbins/syllabify.rb', line 17 def initialize(language, transcription) set_language(language) set_transcription(transcription) initialize_coda_and_onset end |
Instance Method Details
#syllables ⇒ Array
Return the individual Syllable objects representing the transcription’s syllables.
39 40 41 |
# File 'lib/cody_robbins/syllabify.rb', line 39 def syllables @syllables ||= build_syllables end |
#to_s ⇒ String
Render a syllabified IPA transcription of the input transcription. Syllables are delimited by the IPA syllable delimiter.
29 30 31 |
# File 'lib/cody_robbins/syllabify.rb', line 29 def to_s syllables_as_strings.join(SYLLABLE_DELIMETER) end |