lib/sawarineko/converter.rb
def convert(source)
      new_source = source.gsub(@hiragana_regex, 'にゃ'.encode(@encoding).freeze)
                   .gsub(@katakana_regex, 'ニャ'.encode(@encoding).freeze)
      if @hangul_regex
        new_source.gsub(@hangul_regex) { |ch| convert_hangul(ch) }
      else
        new_source
      end
    end
# Convert the source.
#
# source - The String source to convert.
#
# Returns the String converted to Sawarineko.
Convert the source.
source - The String source to convert.

Returns the String converted to Sawarineko.
Convert the source . source - The String source to convert . Returns the String converted to Sawarineko .
def convert(source)
      new_source = source.gsub(@hiragana_regex, 'にゃ'.encode(@encoding).freeze)
                   .gsub(@katakana_regex, 'ニャ'.encode(@encoding).freeze)
      if @hangul_regex
        new_source.gsub(@hangul_regex) { |ch| convert_hangul(ch) }
      else
        new_source
      end
    end
def convert ( source ) new_source = source . gsub ( @hiragana_regex , 'にゃ'.enc o de(@en c oding).fr e e ze) . gsub ( @katakana_regex , 'ニャ'.enc o de(@en c oding).fr e e ze) if @hangul_regex new_source . gsub ( @hangul_regex ) { | ch | convert_hangul ( ch ) } else new_source end end
Convert the source.
Convert the source .
source