Class: Crunchbase::Model::Person
- Defined in:
- lib/crunchbase/model/person.rb
Direct Known Subclasses
Constant Summary collapse
- RESOURCE_LIST =
RESOURCE_NAME = 'people'
Instance Attribute Summary collapse
-
#advisory_roles ⇒ Object
readonly
Returns the value of attribute advisory_roles.
-
#advisory_roles_total_items ⇒ Object
readonly
Returns the value of attribute advisory_roles_total_items.
-
#also_known_as ⇒ Object
readonly
Returns the value of attribute also_known_as.
-
#api_path ⇒ Object
readonly
Returns the value of attribute api_path.
-
#bio ⇒ Object
readonly
Returns the value of attribute bio.
-
#born_on ⇒ Object
readonly
Returns the value of attribute born_on.
-
#born_on_trust_code ⇒ Object
readonly
Returns the value of attribute born_on_trust_code.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#degrees ⇒ Object
readonly
Returns the value of attribute degrees.
-
#degrees_total_items ⇒ Object
readonly
Returns the value of attribute degrees_total_items.
-
#died_on ⇒ Object
readonly
Returns the value of attribute died_on.
-
#died_on_trust_code ⇒ Object
readonly
Returns the value of attribute died_on_trust_code.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#founded_companies ⇒ Object
readonly
Returns the value of attribute founded_companies.
-
#founded_companies_total_items ⇒ Object
readonly
Returns the value of attribute founded_companies_total_items.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#images_total_items ⇒ Object
readonly
Returns the value of attribute images_total_items.
-
#investments ⇒ Object
readonly
Returns the value of attribute investments.
-
#investments_total_items ⇒ Object
readonly
Returns the value of attribute investments_total_items.
-
#is_deceased ⇒ Object
readonly
Returns the value of attribute is_deceased.
-
#jobs ⇒ Object
readonly
Returns the value of attribute jobs.
-
#jobs_total_items ⇒ Object
readonly
Returns the value of attribute jobs_total_items.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#memberships ⇒ Object
readonly
Returns the value of attribute memberships.
-
#memberships_total_items ⇒ Object
readonly
Returns the value of attribute memberships_total_items.
-
#news ⇒ Object
readonly
Returns the value of attribute news.
-
#news_total_items ⇒ Object
readonly
Returns the value of attribute news_total_items.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#primary_affiliation ⇒ Object
readonly
Returns the value of attribute primary_affiliation.
-
#primary_affiliation_total_items ⇒ Object
readonly
Returns the value of attribute primary_affiliation_total_items.
-
#primary_image ⇒ Object
readonly
Returns the value of attribute primary_image.
-
#primary_image_total_items ⇒ Object
readonly
Returns the value of attribute primary_image_total_items.
-
#primary_location ⇒ Object
readonly
Returns the value of attribute primary_location.
-
#primary_location_total_items ⇒ Object
readonly
Returns the value of attribute primary_location_total_items.
-
#role_investor ⇒ Object
readonly
Returns the value of attribute role_investor.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#videos ⇒ Object
readonly
Returns the value of attribute videos.
-
#videos_total_items ⇒ Object
readonly
Returns the value of attribute videos_total_items.
-
#web_path ⇒ Object
readonly
Returns the value of attribute web_path.
-
#websites ⇒ Object
readonly
Returns the value of attribute websites.
-
#websites_total_items ⇒ Object
readonly
Returns the value of attribute websites_total_items.
Attributes inherited from Entity
Instance Method Summary collapse
- #date_keys ⇒ Object
-
#initialize(json) ⇒ Person
constructor
A new instance of Person.
- #property_keys ⇒ Object
Methods inherited from Entity
array_from_list, #fetch, funding_rounds_lists, get, list, organization_lists, parsing_from_list, person_lists, total_items_from_list
Constructor Details
#initialize(json) ⇒ Person
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/crunchbase/model/person.rb', line 21 def initialize(json) super unless (relationships = json['relationships']).nil? set_relationships_object(Crunchbase::Model::PrimaryAffiliation, 'primary_affiliation', relationships['primary_affiliation']) set_relationships_object(Crunchbase::Model::PrimaryAffiliation, 'primary_location', relationships['primary_location']) set_relationships_object(Crunchbase::Model::PrimaryImage, 'primary_image', relationships['primary_image']) set_relationships_object(Crunchbase::Model::Website, 'websites', relationships['websites']) set_relationships_object(Crunchbase::Model::Degree, 'degrees', relationships['degrees']) set_relationships_object(Crunchbase::Model::Job, 'jobs', relationships['jobs']) set_relationships_object(Crunchbase::Model::AdvisoryRole, 'advisory_roles', relationships['advisor_at']) set_relationships_object(Crunchbase::Model::FoundedCompany, 'founded_companies', relationships['founded_companies']) set_relationships_object(Crunchbase::Model::Investment, 'investments', relationships['investments']) set_relationships_object(Crunchbase::Model::Membership, 'memberships', relationships['memberships']) set_relationships_object(Crunchbase::Model::Image, 'images', relationships['images']) set_relationships_object(Crunchbase::Model::Video, 'videos', relationships['videos']) set_relationships_object(Crunchbase::Model::New, 'news', relationships['news']) end end |
Instance Attribute Details
#advisory_roles ⇒ Object (readonly)
Returns the value of attribute advisory_roles.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def advisory_roles @advisory_roles end |
#advisory_roles_total_items ⇒ Object (readonly)
Returns the value of attribute advisory_roles_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def advisory_roles_total_items @advisory_roles_total_items end |
#also_known_as ⇒ Object (readonly)
Returns the value of attribute also_known_as.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def also_known_as @also_known_as end |
#api_path ⇒ Object (readonly)
Returns the value of attribute api_path.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def api_path @api_path end |
#bio ⇒ Object (readonly)
Returns the value of attribute bio.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def bio @bio end |
#born_on ⇒ Object (readonly)
Returns the value of attribute born_on.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def born_on @born_on end |
#born_on_trust_code ⇒ Object (readonly)
Returns the value of attribute born_on_trust_code.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def born_on_trust_code @born_on_trust_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def created_at @created_at end |
#degrees ⇒ Object (readonly)
Returns the value of attribute degrees.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def degrees @degrees end |
#degrees_total_items ⇒ Object (readonly)
Returns the value of attribute degrees_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def degrees_total_items @degrees_total_items end |
#died_on ⇒ Object (readonly)
Returns the value of attribute died_on.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def died_on @died_on end |
#died_on_trust_code ⇒ Object (readonly)
Returns the value of attribute died_on_trust_code.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def died_on_trust_code @died_on_trust_code end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def first_name @first_name end |
#founded_companies ⇒ Object (readonly)
Returns the value of attribute founded_companies.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def founded_companies @founded_companies end |
#founded_companies_total_items ⇒ Object (readonly)
Returns the value of attribute founded_companies_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def founded_companies_total_items @founded_companies_total_items end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def images @images end |
#images_total_items ⇒ Object (readonly)
Returns the value of attribute images_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def images_total_items @images_total_items end |
#investments ⇒ Object (readonly)
Returns the value of attribute investments.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def investments @investments end |
#investments_total_items ⇒ Object (readonly)
Returns the value of attribute investments_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def investments_total_items @investments_total_items end |
#is_deceased ⇒ Object (readonly)
Returns the value of attribute is_deceased.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def is_deceased @is_deceased end |
#jobs ⇒ Object (readonly)
Returns the value of attribute jobs.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def jobs @jobs end |
#jobs_total_items ⇒ Object (readonly)
Returns the value of attribute jobs_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def jobs_total_items @jobs_total_items end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def last_name @last_name end |
#memberships ⇒ Object (readonly)
Returns the value of attribute memberships.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def memberships @memberships end |
#memberships_total_items ⇒ Object (readonly)
Returns the value of attribute memberships_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def memberships_total_items @memberships_total_items end |
#news ⇒ Object (readonly)
Returns the value of attribute news.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def news @news end |
#news_total_items ⇒ Object (readonly)
Returns the value of attribute news_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def news_total_items @news_total_items end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def permalink @permalink end |
#primary_affiliation ⇒ Object (readonly)
Returns the value of attribute primary_affiliation.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def primary_affiliation @primary_affiliation end |
#primary_affiliation_total_items ⇒ Object (readonly)
Returns the value of attribute primary_affiliation_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def primary_affiliation_total_items @primary_affiliation_total_items end |
#primary_image ⇒ Object (readonly)
Returns the value of attribute primary_image.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def primary_image @primary_image end |
#primary_image_total_items ⇒ Object (readonly)
Returns the value of attribute primary_image_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def primary_image_total_items @primary_image_total_items end |
#primary_location ⇒ Object (readonly)
Returns the value of attribute primary_location.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def primary_location @primary_location end |
#primary_location_total_items ⇒ Object (readonly)
Returns the value of attribute primary_location_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def primary_location_total_items @primary_location_total_items end |
#role_investor ⇒ Object (readonly)
Returns the value of attribute role_investor.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def role_investor @role_investor end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def updated_at @updated_at end |
#videos ⇒ Object (readonly)
Returns the value of attribute videos.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def videos @videos end |
#videos_total_items ⇒ Object (readonly)
Returns the value of attribute videos_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def videos_total_items @videos_total_items end |
#web_path ⇒ Object (readonly)
Returns the value of attribute web_path.
8 9 10 |
# File 'lib/crunchbase/model/person.rb', line 8 def web_path @web_path end |
#websites ⇒ Object (readonly)
Returns the value of attribute websites.
12 13 14 |
# File 'lib/crunchbase/model/person.rb', line 12 def websites @websites end |
#websites_total_items ⇒ Object (readonly)
Returns the value of attribute websites_total_items.
15 16 17 |
# File 'lib/crunchbase/model/person.rb', line 15 def websites_total_items @websites_total_items end |
Instance Method Details
#date_keys ⇒ Object
49 50 51 |
# File 'lib/crunchbase/model/person.rb', line 49 def date_keys %w[ born_on died_on ] end |
#property_keys ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/crunchbase/model/person.rb', line 41 def property_keys %w[ permalink api_path web_path first_name last_name also_known_as bio role_investor born_on born_on_trust_code is_deceased died_on died_on_trust_code created_at updated_at ] end |