Class: Muzak::Album

Inherits:
Object
  • Object
show all
Defined in:
lib/muzak/album.rb

Overview

Represents a collection of songs for muzak.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, songs, cover_art = nil) ⇒ Album

Returns a new instance of Album.

Parameters:

  • title (String)

    the album's title

  • songs (Array<Song>)

    the album's songs

  • cover_art (String) (defaults to: nil)

    the album's cover art


18
19
20
21
22
# File 'lib/muzak/album.rb', line 18

def initialize(title, songs, cover_art = nil)
  @title     = title
  @songs     = songs
  @cover_art = cover_art
end

Instance Attribute Details

#cover_artString (readonly)

Returns the path to the album's cover art.

Returns:

  • (String)

    the path to the album's cover art


13
14
15
# File 'lib/muzak/album.rb', line 13

def cover_art
  @cover_art
end

#songsArray<Muzak::Song> (readonly)

Returns the album's songs.

Returns:


10
11
12
# File 'lib/muzak/album.rb', line 10

def songs
  @songs
end

#titleString (readonly)

Returns the album's title.

Returns:

  • (String)

    the album's title


7
8
9
# File 'lib/muzak/album.rb', line 7

def title
  @title
end