Class: Crunchbase::Model::Investor

Inherits:
Entity
  • Object
show all
Defined in:
lib/crunchbase/model/investor.rb

Constant Summary collapse

RESOURCE_LIST =
'investors'.freeze

Instance Attribute Summary collapse

Attributes inherited from Entity

#type_name, #uuid

Instance Method Summary collapse

Methods inherited from Entity

#convert_date!, #date_keys, #fetch, #instance_multi_relationship_objects, #instance_relationships_object, #instance_timestamps, #one_to_many, #one_to_one, #parse_hash_items, #property_keys, #relationship_lists, #set_relationships_object, #set_variables, #setup_relationships_data!, #special_relationship, #verify_item?

Methods included from Request::Client

#api, #array_from_list, #funding_rounds_lists, #get, #kclass_name, #list, #organization_lists, #parsing_from_list, #person_lists, #total_items_from_list

Constructor Details

#initialize(json) ⇒ Investor

Returns a new instance of Investor.



9
10
11
12
# File 'lib/crunchbase/model/investor.rb', line 9

def initialize(json)
  instance_relationships_object(Person, 'object', json) if json['type'] == 'Person'
  instance_relationships_object(Organization, 'object', json) if json['type'] == 'Organization'
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



7
8
9
# File 'lib/crunchbase/model/investor.rb', line 7

def object
  @object
end

Instance Method Details

#organization?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/crunchbase/model/investor.rb', line 18

def organization?
  (object.type_name == 'Organization')
end

#person?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/crunchbase/model/investor.rb', line 14

def person?
  (object.type_name == 'Person')
end