Class: Crunchbase::Model::CurrentTeam
- Defined in:
- lib/crunchbase/model/current_team.rb
Constant Summary collapse
- RESOURCE_LIST =
'current_team'
Instance Attribute Summary collapse
-
#person ⇒ Object
readonly
Returns the value of attribute person.
Attributes inherited from Job
#created_at, #ended_on, #ended_on_trust_code, #organization, #started_on, #started_on_trust_code, #title, #updated_at
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(json) ⇒ CurrentTeam
constructor
A new instance of CurrentTeam.
- #set_relationships_object(object_name, key, item) ⇒ Object
Methods inherited from Job
Methods inherited from Entity
array_from_list, #fetch, get, list, organization_lists, parsing_from_list, person_lists, total_items_from_list
Constructor Details
#initialize(json) ⇒ CurrentTeam
Returns a new instance of CurrentTeam.
10 11 12 13 14 15 16 |
# File 'lib/crunchbase/model/current_team.rb', line 10 def initialize(json) super unless (relationships = json['relationships']).nil? set_relationships_object(Crunchbase::Model::Person, 'person', relationships['person']) end end |
Instance Attribute Details
#person ⇒ Object (readonly)
Returns the value of attribute person.
8 9 10 |
# File 'lib/crunchbase/model/current_team.rb', line 8 def person @person end |
Instance Method Details
#set_relationships_object(object_name, key, item) ⇒ Object
18 19 20 21 22 |
# File 'lib/crunchbase/model/current_team.rb', line 18 def set_relationships_object(object_name, key, item) return unless item instance_variable_set "@#{key}", ( object_name.new(item) || nil ) end |