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.
-
#city_uuid ⇒ Object
readonly
Returns the value of attribute city_uuid.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#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, #fetch, get, list, lists_for_permalink, search, total_items_from_list
Constructor Details
#initialize(json) ⇒ Headquarter
Returns a new instance of Headquarter.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/crunchbase/headquarter.rb', line 12 def initialize(json) @type_name = json['type'] @name = json['name'] @street_1 = json['street_1'] @street_2 = json['street_2'] @city = json['city'] @city_uuid = json['city_uuid'] @city_path = json['city_path'] @region = json['region'] @country_code = json['country_code'] @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.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def city @city end |
#city_path ⇒ Object (readonly)
Returns the value of attribute city_path.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def city_path @city_path end |
#city_uuid ⇒ Object (readonly)
Returns the value of attribute city_uuid.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def city_uuid @city_uuid end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def country_code @country_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def created_at @created_at end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def name @name end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def region @region end |
#street_1 ⇒ Object (readonly)
Returns the value of attribute street_1.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def street_1 @street_1 end |
#street_2 ⇒ Object (readonly)
Returns the value of attribute street_2.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def street_2 @street_2 end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def type_name @type_name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
9 10 11 |
# File 'lib/crunchbase/headquarter.rb', line 9 def updated_at @updated_at end |