Class: Crunchbase::Video

Inherits:
CBEntity show all
Defined in:
lib/crunchbase/video.rb

Constant Summary collapse

RESOURCE_LIST =
'videos'

Constants inherited from CBEntity

CBEntity::RELATIONSHIPS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ Video

Returns a new instance of Video.



12
13
14
15
16
17
# File 'lib/crunchbase/video.rb', line 12

def initialize(json)
  @type_name      = json['type']
  @title          = json['title']
  @created_at     = Time.at(json['created_at']).utc
  @updated_at     = Time.at(json['updated_at']).utc
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



10
11
12
# File 'lib/crunchbase/video.rb', line 10

def created_at
  @created_at
end

#titleObject (readonly)

Returns the value of attribute title.



10
11
12
# File 'lib/crunchbase/video.rb', line 10

def title
  @title
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



10
11
12
# File 'lib/crunchbase/video.rb', line 10

def type_name
  @type_name
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



10
11
12
# File 'lib/crunchbase/video.rb', line 10

def updated_at
  @updated_at
end