Class: EmailProbe::EmailAccount
- Inherits:
-
Object
- Object
- EmailProbe::EmailAccount
- Defined in:
- lib/email_probe/email_account.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #address ⇒ Object
-
#initialize(address_string) ⇒ EmailAccount
constructor
A new instance of EmailAccount.
Constructor Details
#initialize(address_string) ⇒ EmailAccount
Returns a new instance of EmailAccount.
5 6 7 |
# File 'lib/email_probe/email_account.rb', line 5 def initialize(address_string) @name, @domain = address_string.split('@') end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
3 4 5 |
# File 'lib/email_probe/email_account.rb', line 3 def domain @domain end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/email_probe/email_account.rb', line 3 def name @name end |
Instance Method Details
#address ⇒ Object
9 10 11 |
# File 'lib/email_probe/email_account.rb', line 9 def address "#{name}@#{domain}" end |