Class: Kagu::Library

Inherits:
Object
  • Object
show all
Defined in:
lib/kagu/library.rb

Constant Summary collapse

PATH =
File.expand_path("#{ENV['HOME']}/Music/iTunes/iTunes Music Library.xml")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path = PATH) ⇒ Library

Returns a new instance of Library.



9
10
11
# File 'lib/kagu/library.rb', line 9

def initialize(path = PATH)
  self.path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



7
8
9
# File 'lib/kagu/library.rb', line 7

def path
  @path
end

Instance Method Details

#finder(options = {}) ⇒ Object



13
14
15
# File 'lib/kagu/library.rb', line 13

def finder(options = {})
  Finder.new(self, options)
end

#playlistsObject



17
18
19
# File 'lib/kagu/library.rb', line 17

def playlists
  Playlists.new(self)
end

#tracksObject



21
22
23
# File 'lib/kagu/library.rb', line 21

def tracks
  Tracks.new(self)
end