Class: Brainzz::Video
- Defined in:
- lib/brainzz/models/video.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
Returns the value of attribute channel_id.
-
#channel_title ⇒ Object
Returns the value of attribute channel_title.
-
#comment_count ⇒ Object
Returns the value of attribute comment_count.
-
#description ⇒ Object
Returns the value of attribute description.
-
#dislike_count ⇒ Object
Returns the value of attribute dislike_count.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#favorite_count ⇒ Object
Returns the value of attribute favorite_count.
-
#id ⇒ Object
Returns the value of attribute id.
-
#like_count ⇒ Object
Returns the value of attribute like_count.
-
#privacy_status ⇒ Object
Returns the value of attribute privacy_status.
-
#published_at ⇒ Object
Returns the value of attribute published_at.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
-
#view_count ⇒ Object
Returns the value of attribute view_count.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Video
constructor
A new instance of Video.
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() @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_id ⇒ Object
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_title ⇒ Object
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_count ⇒ Object
Returns the value of attribute comment_count.
13 14 15 |
# File 'lib/brainzz/models/video.rb', line 13 def comment_count @comment_count end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/brainzz/models/video.rb', line 5 def description @description end |
#dislike_count ⇒ Object
Returns the value of attribute dislike_count.
11 12 13 |
# File 'lib/brainzz/models/video.rb', line 11 def dislike_count @dislike_count end |
#duration ⇒ Object
Returns the value of attribute duration.
7 8 9 |
# File 'lib/brainzz/models/video.rb', line 7 def duration @duration end |
#favorite_count ⇒ Object
Returns the value of attribute favorite_count.
12 13 14 |
# File 'lib/brainzz/models/video.rb', line 12 def favorite_count @favorite_count end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/brainzz/models/video.rb', line 3 def id @id end |
#like_count ⇒ Object
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_status ⇒ Object
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_at ⇒ Object
Returns the value of attribute published_at.
6 7 8 |
# File 'lib/brainzz/models/video.rb', line 6 def published_at @published_at end |
#tags ⇒ Object
Returns the value of attribute tags.
8 9 10 |
# File 'lib/brainzz/models/video.rb', line 8 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/brainzz/models/video.rb', line 4 def title @title end |
#view_count ⇒ Object
Returns the value of attribute view_count.
9 10 11 |
# File 'lib/brainzz/models/video.rb', line 9 def view_count @view_count end |