Class: Ubi::Memoria::Email
Overview
An Electronic Mail
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.regex(_hint) ⇒ Object
Email regex.
Methods inherited from Base
==, extract_text, #format, inherited, #initialize, key, name, parse, parse!, #parser, plural, #to_s
Constructor Details
This class inherits a constructor from Ubi::Memoria::Base
Class Method Details
.regex(_hint) ⇒ Object
Email regex
13 14 15 16 17 18 19 20 |
# File 'lib/ubi/memorias/email.rb', line 13 def regex(_hint) %r{ ([a-z0-9!#$%&'*+/=?^_`{|}~-]+ (?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@ (?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+ (?:[a-z0-9-]*[a-z0-9])?) }x end |