class String

Constants

AESTHETIC_DELTA

Public Instance Methods

aesthetic() click to toggle source
# File lib/aesthetic.rb, line 4
def aesthetic
  new_string = clone
  new_string.aesthetic!
end
aesthetic!() click to toggle source
# File lib/aesthetic.rb, line 9
def aesthetic!
  self.length.times do |i|
    codepoint = self[i].ord
    if codepoint >= 33 && codepoint <= 126
      self[i] = (codepoint + AESTHETIC_DELTA).chr(Encoding::UTF_8)
    end
  end
  self
end