Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/fat_fingers.rb
Instance Method Summary collapse
-
#clean_up_typoed_email ⇒ Object
Internal: Check a given string for misspelled TLDs and misspelled domains from popular e-mail providers.
Instance Method Details
#clean_up_typoed_email ⇒ Object
Internal: Check a given string for misspelled TLDs and misspelled domains from popular e-mail providers.
Examples
"[email protected]".clean_up_typoed_email
# => "[email protected]"
"[email protected]".clean_up_typoed_email
# => "[email protected]"
Returns the cleaned String.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fat_fingers.rb', line 14 def clean_up_typoed_email downcase. remove_invalid_characters. fix_transposed_periods. remove_period_before_at_sign. handle_different_country_tlds. fix_coms_with_appended_letters. clean_up_funky_coms. clean_up_funky_nets. clean_up_funky_orgs. clean_up_gmail. clean_up_hotmail. clean_up_yahoo. clean_up_other_providers. add_a_period_if_they_forgot_it end |