Class: Brainzz::Video

Inherits:
BaseModel show all
Defined in:
lib/brainzz/models/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Video

Returns a new instance of Video.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/brainzz/models/video.rb', line 18

def initialize(hash = {})
  @hash = hash || {}

  @id             = transform(hash_id)
  @title          = transform(hash_title)
  @description    = transform(hash_description)
  @published_at   = transform_date(hash_published_at)
  @duration       = transform_duration(hash_duration)
  @tags           = transform(hash_tags)
  @view_count     = transform(hash_view_count)
  @like_count     = transform(hash_like_count)
  @dislike_count  = transform(hash_dislike_count)
  @favorite_count = transform(hash_favorite_count)
  @comment_count  = transform(hash_comment_count)
  @channel_id     = transform(hash_channel_id)
  @channel_title  = transform(hash_channel_title)
  @privacy_status = transform(hash_privacy_status)
end

Instance Attribute Details

#channel_idObject

Returns the value of attribute channel_id.



14
15
16
# File 'lib/brainzz/models/video.rb', line 14

def channel_id
  @channel_id
end

#channel_titleObject

Returns the value of attribute channel_title.



15
16
17
# File 'lib/brainzz/models/video.rb', line 15

def channel_title
  @channel_title
end

#comment_countObject

Returns the value of attribute comment_count.



13
14
15
# File 'lib/brainzz/models/video.rb', line 13

def comment_count
  @comment_count
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/brainzz/models/video.rb', line 5

def description
  @description
end

#dislike_countObject

Returns the value of attribute dislike_count.



11
12
13
# File 'lib/brainzz/models/video.rb', line 11

def dislike_count
  @dislike_count
end

#durationObject

Returns the value of attribute duration.



7
8
9
# File 'lib/brainzz/models/video.rb', line 7

def duration
  @duration
end

#favorite_countObject

Returns the value of attribute favorite_count.



12
13
14
# File 'lib/brainzz/models/video.rb', line 12

def favorite_count
  @favorite_count
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/brainzz/models/video.rb', line 3

def id
  @id
end

#like_countObject

Returns the value of attribute like_count.



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

def like_count
  @like_count
end

#privacy_statusObject

Returns the value of attribute privacy_status.



16
17
18
# File 'lib/brainzz/models/video.rb', line 16

def privacy_status
  @privacy_status
end

#published_atObject

Returns the value of attribute published_at.



6
7
8
# File 'lib/brainzz/models/video.rb', line 6

def published_at
  @published_at
end

#tagsObject

Returns the value of attribute tags.



8
9
10
# File 'lib/brainzz/models/video.rb', line 8

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/brainzz/models/video.rb', line 4

def title
  @title
end

#view_countObject

Returns the value of attribute view_count.



9
10
11
# File 'lib/brainzz/models/video.rb', line 9

def view_count
  @view_count
end