Class: Crunchbase::Model::PrimaryLocation

Inherits:
Location show all
Defined in:
lib/crunchbase/model/primary_location.rb

Constant Summary

Constants inherited from Location

Location::RESOURCE_LIST

Instance Attribute Summary collapse

Attributes inherited from Location

#created_at, #location_type, #name, #parent_location_uuid, #parent_locations_total_items, #updated_at, #web_path

Attributes inherited from Entity

#type_name, #uuid

Instance Method Summary collapse

Methods inherited from Location

#property_keys

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) ⇒ PrimaryLocation

Returns a new instance of PrimaryLocation.



8
9
10
11
12
13
14
# File 'lib/crunchbase/model/primary_location.rb', line 8

def initialize(json)
  super

  unless (relationships = json['relationships']).nil?
    set_relationships_object(Crunchbase::Model::ParentLocation, 'parent_locations', relationships['parent_locations'])
  end
end

Instance Attribute Details

#parent_locationsObject (readonly)

Returns the value of attribute parent_locations.



6
7
8
# File 'lib/crunchbase/model/primary_location.rb', line 6

def parent_locations
  @parent_locations
end