Class: Crunchbase::Office
Constant Summary collapse
- RESOURCE_LIST =
'offices'
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) ⇒ Office
constructor
A new instance of Office.
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) ⇒ Office
Returns a new instance of Office.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/crunchbase/office.rb', line 13 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.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def city @city end |
#city_path ⇒ Object (readonly)
Returns the value of attribute city_path.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def city_path @city_path end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def country @country end |
#country_path ⇒ Object (readonly)
Returns the value of attribute country_path.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def country_path @country_path end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def created_at @created_at end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def longitude @longitude end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def name @name end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def region @region end |
#region_path ⇒ Object (readonly)
Returns the value of attribute region_path.
9 10 11 |
# File 'lib/crunchbase/office.rb', line 9 def region_path @region_path end |
#street_1 ⇒ Object (readonly)
Returns the value of attribute street_1.
9 10 11 |
# File 'lib/crunchbase/office.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/office.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/office.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/office.rb', line 9 def updated_at @updated_at end |