Class: Brainzz::PlaylistItem

Inherits:
Object
  • Object
show all
Defined in:
lib/brainzz/models/playlist_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ PlaylistItem

Returns a new instance of PlaylistItem.



5
6
7
8
9
10
# File 'lib/brainzz/models/playlist_item.rb', line 5

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

  @id = hash['id']
  @video = Video.new(video_hash)
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#videoObject

Returns the value of attribute video.



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

def video
  @video
end