Class: EmailProbe::EmailAccount

Inherits:
Object
  • Object
show all
Defined in:
lib/email_probe/email_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#domainObject (readonly)

Returns the value of attribute domain.



3
4
5
# File 'lib/email_probe/email_account.rb', line 3

def domain
  @domain
end

#nameObject (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

#addressObject



9
10
11
# File 'lib/email_probe/email_account.rb', line 9

def address
  "#{name}@#{domain}"
end