lib/itaiji/converter.rb in itaiji-0.0.1 vs lib/itaiji/converter.rb in itaiji-0.1.0
- old
+ new
@@ -1,19 +1,19 @@
#encoding: utf-8
module Itaiji
class Converter
- def to_seijitai(string)
+ def convert_seijitai(string)
itaiji_list.each do |itaiji_set|
seijitai = itaiji_set.keys.first
itaijis = itaiji_set.values.first
string.gsub!(/#{itaijis.join('|')}/, seijitai)
end
string
end
- def to_itaiji(string)
+ def convert_itaiji(string)
itaiji_list.each do |itaiji_set|
seijitai = itaiji_set.keys.first
itaiji = itaiji_set.values.flatten.first