lib/ting/groundwork.rb in ting-0.9.0 vs lib/ting/groundwork.rb in ting-0.10.0
- old
+ new
@@ -155,11 +155,11 @@
#
# Yields a block for any valid initial/final pair
#
def valid_combinations( &blk )
- return to_enum(__message__) unless block_given?
+ return to_enum(__method__) unless block_given?
inp = YAML::load(IO.read(File.join(File.dirname(__FILE__), 'data', 'valid_pinyin.yaml')))
inp.each do |final, initials|
final = Final.const_get(final)
initials.each do |initial, pinyin|
initial = Initial.const_get(initial)
@@ -167,10 +167,10 @@
end
end
end
def all_syllables( &blk )
- return to_enum(__message__) unless block_given?
+ return to_enum(__method__) unless block_given?
valid_combinations.map do |i,f|
1.upto(5) do |t|
yield Syllable.new(i,f,t,false)
yield Syllable.new(i,f,t,true)
end