Class: EmailInquire::Response
- Inherits:
-
Object
- Object
- EmailInquire::Response
- Defined in:
- lib/email_inquire/response.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#replacement ⇒ Object
Returns the value of attribute replacement.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #hint!(domain: nil) ⇒ Object
- #hint? ⇒ Boolean
- #invalid! ⇒ Object
- #invalid? ⇒ Boolean
- #status? ⇒ Boolean
- #valid! ⇒ Object
- #valid? ⇒ Boolean
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
6 7 8 |
# File 'lib/email_inquire/response.rb', line 6 def email @email end |
#replacement ⇒ Object
Returns the value of attribute replacement.
6 7 8 |
# File 'lib/email_inquire/response.rb', line 6 def replacement @replacement end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/email_inquire/response.rb', line 6 def status @status end |
Instance Method Details
#hint!(domain: nil) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/email_inquire/response.rb', line 8 def hint!(domain: nil) self.status = :hint old_name, _old_domain = email.split("@") self.replacement = "#{old_name}@#{domain}" if domain end |
#hint? ⇒ Boolean
15 16 17 |
# File 'lib/email_inquire/response.rb', line 15 def hint? status == :hint end |
#invalid! ⇒ Object
19 20 21 |
# File 'lib/email_inquire/response.rb', line 19 def invalid! self.status = :invalid end |
#invalid? ⇒ Boolean
23 24 25 |
# File 'lib/email_inquire/response.rb', line 23 def invalid? status == :invalid end |
#status? ⇒ Boolean
27 28 29 |
# File 'lib/email_inquire/response.rb', line 27 def status? !status.nil? end |
#valid! ⇒ Object
31 32 33 |
# File 'lib/email_inquire/response.rb', line 31 def valid! self.status = :valid end |
#valid? ⇒ Boolean
35 36 37 |
# File 'lib/email_inquire/response.rb', line 35 def valid? status == :valid end |