Class: Pinyin::Writer
- Inherits:
-
Object
- Object
- Pinyin::Writer
- Defined in:
- lib/pinyin.rb
Instance Method Summary collapse
-
#initialize(conv, tone) ⇒ Writer
constructor
A new instance of Writer.
- #unparse(py) ⇒ Object (also: #<<)
Constructor Details
Instance Method Details
#unparse(py) ⇒ Object Also known as: <<
52 53 54 55 56 57 58 59 |
# File 'lib/pinyin.rb', line 52 def unparse(py) conv=lambda {|syll| @tone.add_tone(Conversions.unparse(@conv,syll),syll.tone)} if py.respond_to? :map py.map(&conv).join(' ') else conv.call(py) end end |