Sha256: cb71aa700adcc8d73b106a3ce24557485e1fc80bd935ca3c007b9dc7be29304d

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

require "camify/version"



class Camify
#

  def process(str)
    replacement_letters = ["ǎ", "ᶀ", "č", "ď", "ě", "ᶂ", "ǧ", "ȟ", "į", "ǰ", "ǩ", "ľ", "m̃", "ň", "ǒ", "p̃", "ʠ", "ř", "š", "ť", "ǔ", "ṽ", "ẘ", "x̌", "ɏ", "ž"]
    new_string = []
    split_array = str.split('')
    split_array.map do |letter|
      if letter.ord >= 97 && letter.ord <= 122
        rep = letter.ord - 97
        new_string.push(replacement_letters[rep])
      else
        new_string.push(letter)
      end

    end

    new_string.join()
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
camify-1.0.0 lib/camify.rb