Module: Gimchi::Char::Component
- Defined in:
- lib/gimchi/char.rb
Overview
Three components of Gimchi::Char are extended to support #vowel? and #consonant? method.
Instance Attribute Summary collapse
-
#kor ⇒ Korean
Hosting Korean instance.
Instance Method Summary collapse
-
#consonant? ⇒ Boolean
Is this component a consonant?.
-
#vowel? ⇒ Boolean
Is this component a vowel?.
Instance Attribute Details
#kor ⇒ Korean
Returns Hosting Korean instance.
98 99 100 |
# File 'lib/gimchi/char.rb', line 98 def kor @kor end |
Instance Method Details
#consonant? ⇒ Boolean
Is this component a consonant?
106 107 108 |
# File 'lib/gimchi/char.rb', line 106 def consonant? self != 'ㅇ' && kor.chosung?(self) end |
#vowel? ⇒ Boolean
Is this component a vowel?
101 102 103 |
# File 'lib/gimchi/char.rb', line 101 def vowel? kor.jungsung? self end |