Skip to content

Instantly share code, notes, and snippets.

@thiagovsk
Last active March 16, 2022 21:31
Embed
What would you like to do?
bad modules example
class Payment
def formatted_phone(phone)
phone.delete("^0-9")
end
end
class Contact
def formatted_phone(phone)
phone.gsub(/[^0-9]/, '')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment