Class: Crunchbase::Headquarter
- Defined in:
- lib/crunchbase/headquarter.rb
Constant Summary collapse
- RESOURCE_LIST =
'headquarters'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#city_path ⇒ Object
readonly
Returns the value of attribute city_path.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#country_path ⇒ Object
readonly
Returns the value of attribute country_path.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#region_path ⇒ Object
readonly
Returns the value of attribute region_path.
-
#street_1 ⇒ Object
readonly
Returns the value of attribute street_1.
-
#street_2 ⇒ Object
readonly
Returns the value of attribute street_2.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ Headquarter
constructor
A new instance of Headquarter.
Methods inherited from CBEntity
array_from_list, category_lists_by_permalink, #fetch, get, list, lists_for_permalink, lists_for_person_permalink, parsing_from_list, search, total_items_from_list
Constructor Details
#initialize(json) ⇒ Headquarter
Returns a new instance of Headquarter.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/crunchbase/headquarter.rb', line 14 def initialize(json) @type_name = json['type'] @name = json['name'] @street_1 = json['street_1'] @street_2 = json['street_2'] @postal_code = json['postal_code'] @city = json['city'] @city_path = json['city_path'] @region = json['region'] @region_path = json['region_path'] @country = json['country'] @country_path = json['country_path'] @latitude = json['latitude'] @longitude = json['longitude'] @created_at = Time.at(json['created_at']).utc @updated_at = Time.at(json['updated_at']).utc end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def city @city end |
#city_path ⇒ Object (readonly)
Returns the value of attribute city_path.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def city_path @city_path end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def country @country end |
#country_path ⇒ Object (readonly)
Returns the value of attribute country_path.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def country_path @country_path end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def created_at @created_at end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def longitude @longitude end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def name @name end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def region @region end |
#region_path ⇒ Object (readonly)
Returns the value of attribute region_path.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def region_path @region_path end |
#street_1 ⇒ Object (readonly)
Returns the value of attribute street_1.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def street_1 @street_1 end |
#street_2 ⇒ Object (readonly)
Returns the value of attribute street_2.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def street_2 @street_2 end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def type_name @type_name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/crunchbase/headquarter.rb', line 10 def updated_at @updated_at end |