Class: CustomersMailCloud::MailAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/customers_mail_cloud/mail_address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email, name) ⇒ MailAddress

Returns a new instance of MailAddress.


3
4
5
6
# File 'lib/customers_mail_cloud/mail_address.rb', line 3

def initialize email, name
  @email = email
  @name = name
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.


7
8
9
# File 'lib/customers_mail_cloud/mail_address.rb', line 7

def email
  @email
end

#nameObject

Returns the value of attribute name.


7
8
9
# File 'lib/customers_mail_cloud/mail_address.rb', line 7

def name
  @name
end

Instance Method Details

#to_hObject


9
10
11
# File 'lib/customers_mail_cloud/mail_address.rb', line 9

def to_h
  return {address: @email, name: @name}
end