Class: CustomersMailCloud::MailAddress
- Inherits:
-
Object
- Object
- CustomersMailCloud::MailAddress
- Defined in:
- lib/customers_mail_cloud/mail_address.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(email, name) ⇒ MailAddress
constructor
A new instance of MailAddress.
- #to_h ⇒ Object
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
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/customers_mail_cloud/mail_address.rb', line 7 def email @email end |
#name ⇒ Object
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_h ⇒ Object
9 10 11 |
# File 'lib/customers_mail_cloud/mail_address.rb', line 9 def to_h return {address: @email, name: @name} end |