Sha256: c63c175db13e9642d958f34ea11aa866253de2c2f417a4e78b4e0fbed76fdd1f
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
# encoding: utf-8 class Bubs VERSION = '0.0.1' # Convert words to ⓌⓄⓇⒹⓈ. # # Returns a String, but a much cooler string than what you had initially. def self.convert(text) bubs = { :A => :Ⓐ, :B => :Ⓑ, :C => :Ⓒ, :D => :Ⓓ, :E => :Ⓔ, :F => :Ⓕ, :G => :Ⓖ, :H => :Ⓗ, :I => :Ⓘ, :J => :Ⓙ, :K => :Ⓚ, :L => :Ⓛ, :M => :Ⓜ, :N => :Ⓝ, :O => :Ⓞ, :P => :Ⓟ, :Q => :Ⓠ, :R => :Ⓡ, :S => :Ⓢ, :T => :Ⓣ, :U => :Ⓤ, :V => :Ⓥ, :W => :Ⓦ, :X => :Ⓧ, :Y => :Ⓨ, :Z => :Ⓩ, :a => :ⓐ, :b => :ⓑ, :c => :ⓒ, :d => :ⓓ, :e => :ⓔ, :f => :ⓕ, :g => :ⓖ, :h => :ⓗ, :i => :ⓘ, :j => :ⓙ, :k => :ⓚ, :l => :ⓛ, :m => :ⓜ, :n => :ⓝ, :o => :ⓞ, :p => :ⓟ, :q => :ⓠ, :r => :ⓡ, :s => :ⓢ, :t => :ⓣ, :u => :ⓤ, :v => :ⓥ, :w => :ⓦ, :x => :ⓧ, :y => :ⓨ, :z => :ⓩ } bubbled = text.split(//).map do |letter| bubs[letter.to_sym] || letter end.join('') `echo "#{bubbled}" | pbcopy` if RUBY_PLATFORM =~ /darwin/ puts bubbled end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bubs-0.0.1 | lib/bubs.rb |