class MusicBox::Catalog::AlbumTrack
Attributes
album[RW]
artist[RW]
disc[RW]
file[RW]
title[RW]
track[RW]
Public Class Methods
new(params={})
click to toggle source
# File lib/musicbox/catalog/album_track.rb, line 15 def initialize(params={}) params.each { |k, v| send("#{k}=", v) } end
Public Instance Methods
file=(file)
click to toggle source
# File lib/musicbox/catalog/album_track.rb, line 19 def file=(file) @file = Path.new(file) end
path()
click to toggle source
# File lib/musicbox/catalog/album_track.rb, line 23 def path @album.dir / @file end
to_h()
click to toggle source
# File lib/musicbox/catalog/album_track.rb, line 52 def to_h { title: @title, artist: @artist, track: @track, disc: @disc, file: @file.to_s, }.compact end