Module: Normailize::Provider::ClassMethods
- Defined in:
- lib/normailize/provider.rb
Instance Method Summary collapse
-
#domains ⇒ Object
Internal: Get domains that are associated with the provider.
-
#set_domains(*domains) ⇒ Object
Public: Set on or more domains for a provider.
-
#set_modifications(*modifications) ⇒ Object
Public: Set one or more modifications to be performed on email address belonging to the provider.
Instance Method Details
#domains ⇒ Object
Internal: Get domains that are associated with the provider
Returns an array of domains
56 57 58 |
# File 'lib/normailize/provider.rb', line 56 def domains @domains || [] end |
#set_domains(*domains) ⇒ Object
Public: Set on or more domains for a provider
*domains - one or more domains
Returns nothing
33 34 35 |
# File 'lib/normailize/provider.rb', line 33 def set_domains(*domains) @domains = domains end |
#set_modifications(*modifications) ⇒ Object
Public: Set one or more modifications to be performed on email address belonging to the provider
*modifications - One or more modification symbols
Currently, the following modifications are supported:
- :lowercase Lowercase characthers in username part
- :remove_dots Removes all dots in username part
- :remove_plus_part Removes everything after the first occurrence of a plus sign
Returns nothing
49 50 51 |
# File 'lib/normailize/provider.rb', line 49 def set_modifications(*modifications) self.modifications = modifications.map(&:to_sym) end |