class Wco::Leadset
def self.from_email email
def self.from_email email _domain = email.split('@')[1] words = _domain.split('.') if %w| com net gov org |.include?( words[-2] ) words = words[-3, 3] else words = words[-2, 2] end _domain = words.join('.') find_or_create_by( company_url: _domain ) end