Class: Crunchbase::Location
- Defined in:
- lib/crunchbase/location.rb
Constant Summary collapse
- RESOURCE_NAME =
'location'
- RESOURCE_LIST =
'locations'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#location_type ⇒ Object
readonly
Returns the value of attribute location_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent_location_uuid ⇒ Object
readonly
Returns the value of attribute parent_location_uuid.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(json) ⇒ Location
constructor
A new instance of Location.
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) ⇒ Location
Returns a new instance of Location.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/crunchbase/location.rb', line 12 def initialize(json) @location_type = json['location_type'] @name = json['name'] @path = json['path'] @parent_location_uuid = json['parent_location_uuid'] @uuid = json['uuid'] @type_name = json['type'] @created_at = Time.at(json['created_at']).utc @updated_at = Time.at(json['updated_at']).utc end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
9 10 11 |
# File 'lib/crunchbase/location.rb', line 9 def created_at @created_at end |
#location_type ⇒ Object (readonly)
Returns the value of attribute location_type.
9 10 11 |
# File 'lib/crunchbase/location.rb', line 9 def location_type @location_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/crunchbase/location.rb', line 9 def name @name end |
#parent_location_uuid ⇒ Object (readonly)
Returns the value of attribute parent_location_uuid.
9 10 11 |
# File 'lib/crunchbase/location.rb', line 9 def parent_location_uuid @parent_location_uuid end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/crunchbase/location.rb', line 9 def path @path end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
9 10 11 |
# File 'lib/crunchbase/location.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/location.rb', line 9 def updated_at @updated_at end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
9 10 11 |
# File 'lib/crunchbase/location.rb', line 9 def uuid @uuid end |