Class: Pinyin::Final

Inherits:
Object
  • Object
show all
Defined in:
lib/pinyin/groundwork.rb

Overview

A Chinese final (end of a syllable)

Constant Summary collapse

All =
%w(
  Empty A O E Ee Ai Ei Ao Ou An En Ang Eng Ong Er 
  I Ia Io Ie Iai Iao Iu Ian In Iang Ing 
  U Ua Uo Uai Ui Uan Un Uang Ueng V Ue Van Vn Iong
).map{|c| const_set c, Final.new(c)}
Groups =
[
 Group_0=[ Empty ],
 Group_A=[ A,O,E,Ee,Ai,Ei,Ao,Ou,An,En,Ang,Eng,Ong,Er ],
 Group_I=[ I,Ia,Io,Ie,Iai,Iao,Iu,Ian,In,Iang,Ing ],
 Group_U=[ U,Ua,Uo,Uai,Ui,Uan,Un,Uang,Ueng ],
 Group_V=[ V,Ue,Van,Vn,Iong]
]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(n) ⇒ Final

Returns a new instance of Final.



54
55
56
# File 'lib/pinyin/groundwork.rb', line 54

def initialize(n)
  @name=n
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



53
54
55
# File 'lib/pinyin/groundwork.rb', line 53

def name
  @name
end

Instance Method Details

#inspectObject



75
76
77
# File 'lib/pinyin/groundwork.rb', line 75

def inspect()
  "<#{self.class.name}::#{name}>"
end