Class: Crunchbase::Category

Inherits:
CBEntity show all
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

Instance Method Summary collapse

Methods inherited from CBEntity

array_from_list, #fetch, get, list, lists_for_permalink, search, total_items_from_list

Constructor Details

#initialize(json) ⇒ Category

Returns a new instance of Category.



11
12
13
14
15
16
17
18
19
# File 'lib/crunchbase/category.rb', line 11

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_atObject (readonly)

Returns the value of attribute created_at.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def created_at
  @created_at
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def name
  @name
end

#number_of_organizationsObject (readonly)

Returns the value of attribute number_of_organizations.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def number_of_organizations
  @number_of_organizations
end

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def path
  @path
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def type_name
  @type_name
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def updated_at
  @updated_at
end

#uuidObject (readonly)

Returns the value of attribute uuid.



9
10
11
# File 'lib/crunchbase/category.rb', line 9

def uuid
  @uuid
end