Skip to content

Instantly share code, notes, and snippets.

@a-bx
Last active July 29, 2019 18:31
Show Gist options
  • Save a-bx/30bed4a4e04cedf35f4a to your computer and use it in GitHub Desktop.
Save a-bx/30bed4a4e04cedf35f4a to your computer and use it in GitHub Desktop.
Cavgsify
# String extensions
class String
def cavgsify
gsub /ca([Z b-df-hj-np-tv-z]|[ ]|\Z)/, 'cavg\1'
end
def ochoafy
gsub /a/, 'aaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaA'
end
def zorrongify
"Hola chiquillos, ustedes que saben, ¿#{self}?, ¿que es mejor?"
end
def czernylize!
replace "buena #{self}, vamos con todo!"
end
def czernylize
"buena #{self}, vamos con todo!"
end
def czernylize_no_more_ideas_to_say
'grande equipo'
end
def iccfy!
gsub!(/\d+/) { |m| m.to_f * 0.25 }
end
def akkrfy!
gsub!(/\d+/) { |m| m.to_f * 1.75 }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment