2022-12-15 15:40:44 +00:00
|
|
|
class ContactDrop < BaseDrop
|
|
|
|
def email
|
|
|
|
@obj.try(:email)
|
|
|
|
end
|
|
|
|
|
|
|
|
def phone_number
|
|
|
|
@obj.try(:phone_number)
|
|
|
|
end
|
2022-12-23 06:26:17 +00:00
|
|
|
|
|
|
|
def first_name
|
|
|
|
@obj.try(:name).try(:split, ' ').try(:first)
|
|
|
|
end
|
|
|
|
|
|
|
|
def last_name
|
|
|
|
@obj.try(:name).try(:split, ' ').try(:last) if @obj.try(:name).try(:split, ' ').try(:size) > 1
|
|
|
|
end
|
2022-12-15 15:40:44 +00:00
|
|
|
end
|