Class: Java::DeFelixbrunsJotifyMedia::Playlist

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/jotify/media.rb

Instance Method Summary collapse

Instance Method Details

#each(&block) ⇒ Object



22
23
24
# File 'lib/jotify/media.rb', line 22

def each(&block) 
  tracks.each(&block)
end

#inspectObject



26
27
28
# File 'lib/jotify/media.rb', line 26

def inspect
  "[Playlist: #{self.getId()} #{getTracks.to_a}]"
end

#to_hObject



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/jotify/media.rb', line 30

def to_h
  {
    :id => getId(),
    :name=> name,
    :url => link,
    :tracks => tracks.map { |t| t.to_h },
    :author => author,
    :revision => revision,
    :collaborative => collaborative
  }
end