Class: Unit::Types::BusinessContact

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/types/business_contact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_name, email, phone) ⇒ BusinessContact

Returns a new instance of BusinessContact.

Parameters:



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

#emailObject (readonly)

Returns the value of attribute email.



9
10
11
# File 'lib/unit/types/business_contact.rb', line 9

def email
  @email
end

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

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

#representObject



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