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