Class: Crunchbase::Model::Investor
- Defined in:
- lib/crunchbase/model/investor.rb
Constant Summary collapse
- RESOURCE_LIST =
'investors'
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(json) ⇒ Investor
constructor
A new instance of Investor.
- #organization? ⇒ Boolean
- #person? ⇒ Boolean
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) ⇒ Investor
10 11 12 13 |
# File 'lib/crunchbase/model/investor.rb', line 10 def initialize(json) instance_relationships_object(Crunchbase::Model::Person, 'object', json) if json['type'] == 'Person' instance_relationships_object(Crunchbase::Model::Organization, 'object', json) if json['type'] == 'Organization' end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
8 9 10 |
# File 'lib/crunchbase/model/investor.rb', line 8 def object @object end |
Instance Method Details
#organization? ⇒ Boolean
19 20 21 |
# File 'lib/crunchbase/model/investor.rb', line 19 def organization? (object.type_name == "Organization") end |
#person? ⇒ Boolean
15 16 17 |
# File 'lib/crunchbase/model/investor.rb', line 15 def person? (object.type_name == "Person") end |