Class: Ting::Final

Inherits:
Object
  • Object
show all
Extended by:
Enumerable
Defined in:
lib/ting/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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(n) ⇒ Final

Returns a new instance of Final.



57
# File 'lib/ting/groundwork.rb', line 57

def initialize(n) ; @name=n ; end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



55
56
57
# File 'lib/ting/groundwork.rb', line 55

def name
  @name
end

Class Method Details

.each(&blk) ⇒ Object



68
# File 'lib/ting/groundwork.rb', line 68

def each(&blk) ; All.each(&blk) ; end

Instance Method Details

#inspectObject



79
# File 'lib/ting/groundwork.rb', line 79

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