class CultomePlayer::Objects::Song

The ActiveRecord model for Song objects.

Public Instance Methods

path() click to toggle source

Get the full path to the song file.

@return [String] The full path to the song file.

# File lib/cultome_player/objects/song.rb, line 22
def path
  File.join(self.drive.path, self.relative_path)
end
to_s() click to toggle source
# File lib/cultome_player/objects/song.rb, line 26
def to_s
  str = c4(":::: Song: ")
  str += c14(self.name)

  unless self.artist.nil?
    str += c4(" \\ Artist: ")
    str += c15(self.artist.name)
  end

  unless self.album.nil?
    str += c4(" \\ Album: ")
    str += c16(self.album.name)
  end
  str += c4(" ::::")
end