Class: Gadgeto::Email
- Inherits:
-
Object
- Object
- Gadgeto::Email
- Includes:
- Validators
- Defined in:
- lib/gadgeto/email.rb,
lib/gadgeto/email/validators.rb
Defined Under Namespace
Modules: Validators
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email) ⇒ Email
constructor
A new instance of Email.
- #valid? ⇒ Boolean
Methods included from Validators
Constructor Details
#initialize(email) ⇒ Email
Returns a new instance of Email.
14 15 16 |
# File 'lib/gadgeto/email.rb', line 14 def initialize(email) @email = email end |
Class Method Details
.valid?(object) ⇒ Boolean
8 9 10 11 |
# File 'lib/gadgeto/email.rb', line 8 def valid?(object) o = new object o.valid? end |
Instance Method Details
#valid? ⇒ Boolean
18 19 20 |
# File 'lib/gadgeto/email.rb', line 18 def valid? email? @email end |