Class: RJL::Playlist
- Inherits:
-
Object
- Object
- RJL::Playlist
- Defined in:
- lib/rjl/playlist.rb
Instance Attribute Summary collapse
-
#tracks ⇒ Object
Returns the value of attribute tracks.
Instance Method Summary collapse
- #get_tracks(playlist_obj) ⇒ Object
-
#initialize(playlist_obj) ⇒ Playlist
constructor
A new instance of Playlist.
- #name ⇒ Object
- #name=(str) ⇒ Object
Constructor Details
#initialize(playlist_obj) ⇒ Playlist
Returns a new instance of Playlist.
11 12 13 14 15 |
# File 'lib/rjl/playlist.rb', line 11 def initialize( playlist_obj ) @playlist_obj = playlist_obj @folder = playlist_obj.special_kind.get @tracks = get_tracks( playlist_obj ) end |
Instance Attribute Details
#tracks ⇒ Object
Returns the value of attribute tracks.
10 11 12 |
# File 'lib/rjl/playlist.rb', line 10 def tracks @tracks end |
Instance Method Details
#get_tracks(playlist_obj) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/rjl/playlist.rb', line 17 def get_tracks( playlist_obj ) tracks = [] track_obj_list = playlist_obj.tracks.get track_obj_list.each do |track_obj| tracks << RJL::Track.new( track_obj ) end return tracks end |
#name ⇒ Object
26 27 28 |
# File 'lib/rjl/playlist.rb', line 26 def name return @playlist_obj.name.get end |
#name=(str) ⇒ Object
29 30 31 |
# File 'lib/rjl/playlist.rb', line 29 def name=(str) @playlist_obj.name.set(str) end |