Class: Pinyin::Syllable
- Inherits:
-
TonelessSyllable
- Object
- TonelessSyllable
- Pinyin::Syllable
- Defined in:
- lib/pinyin/groundwork.rb
Overview
Syllable : initial, final and tone
Instance Attribute Summary collapse
-
#tone ⇒ Object
Returns the value of attribute tone.
Attributes inherited from TonelessSyllable
Instance Method Summary collapse
-
#initialize(initial, final, tone) ⇒ Syllable
constructor
A new instance of Syllable.
- #inspect ⇒ Object (also: #to_s)
Methods inherited from TonelessSyllable
Constructor Details
#initialize(initial, final, tone) ⇒ Syllable
Returns a new instance of Syllable.
117 118 119 120 |
# File 'lib/pinyin/groundwork.rb', line 117 def initialize(initial, final, tone) super(initial, final) self.tone = tone end |
Instance Attribute Details
#tone ⇒ Object
Returns the value of attribute tone.
115 116 117 |
# File 'lib/pinyin/groundwork.rb', line 115 def tone @tone end |
Instance Method Details
#inspect ⇒ Object Also known as: to_s
122 123 124 |
# File 'lib/pinyin/groundwork.rb', line 122 def inspect "<#{self.class.name} <initial=#{initial.name}, final=#{final.name}, tone=#{tone}>>" end |