Class: Outreach::Prospect
- Inherits:
-
Object
- Object
- Outreach::Prospect
- Defined in:
- lib/outreach/prospect.rb
Instance Attribute Summary collapse
-
#company ⇒ Object
Returns the value of attribute company.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Prospect
constructor
A new instance of Prospect.
Constructor Details
#initialize(attrs) ⇒ Prospect
5 6 7 8 9 10 11 |
# File 'lib/outreach/prospect.rb', line 5 def initialize(attrs) @first_name = attrs['attributes']['personal']['name']['first'] @last_name = attrs['attributes']['personal']['name']['last'] @company = to_ostruct(attrs['attributes']['company']) @contact = to_ostruct(attrs['attributes']['contact']) = attrs['attributes']['metadata']['tags'] end |
Instance Attribute Details
#company ⇒ Object
Returns the value of attribute company.
3 4 5 |
# File 'lib/outreach/prospect.rb', line 3 def company @company end |
#contact ⇒ Object
Returns the value of attribute contact.
3 4 5 |
# File 'lib/outreach/prospect.rb', line 3 def contact @contact end |
#first_name ⇒ Object
Returns the value of attribute first_name.
3 4 5 |
# File 'lib/outreach/prospect.rb', line 3 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name.
3 4 5 |
# File 'lib/outreach/prospect.rb', line 3 def last_name @last_name end |
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/outreach/prospect.rb', line 3 def end |