Class: Unit::Types::BusinessContact
- Inherits:
-
Object
- Object
- Unit::Types::BusinessContact
- Defined in:
- lib/unit/types/business_contact.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
-
#initialize(full_name, email, phone) ⇒ BusinessContact
constructor
A new instance of BusinessContact.
- #represent ⇒ Object
Constructor Details
#initialize(full_name, email, phone) ⇒ BusinessContact
Returns a new instance of BusinessContact.
14 15 16 17 18 |
# File 'lib/unit/types/business_contact.rb', line 14 def initialize(full_name, email, phone) @full_name = full_name @email = email @phone = phone end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
9 10 11 |
# File 'lib/unit/types/business_contact.rb', line 9 def email @email end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
9 10 11 |
# File 'lib/unit/types/business_contact.rb', line 9 def full_name @full_name end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
9 10 11 |
# File 'lib/unit/types/business_contact.rb', line 9 def phone @phone end |
Instance Method Details
#represent ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/unit/types/business_contact.rb', line 20 def represent { fullName: full_name.represent, email: email, phone: phone.represent } end |