Class: MusicBox::Catalog::Track
- Inherits:
-
Object
- Object
- MusicBox::Catalog::Track
- Defined in:
- lib/musicbox/catalog/track.rb
Instance Attribute Summary collapse
-
#artists ⇒ Object
Returns the value of attribute artists.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#extraartists ⇒ Object
Returns the value of attribute extraartists.
-
#position ⇒ Object
Returns the value of attribute position.
-
#sub_tracks ⇒ Object
Returns the value of attribute sub_tracks.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #artist ⇒ Object
-
#initialize(params = {}) ⇒ Track
constructor
A new instance of Track.
- #type_=(type) ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Track
Returns a new instance of Track.
15 16 17 |
# File 'lib/musicbox/catalog/track.rb', line 15 def initialize(params={}) params.each { |k, v| send("#{k}=", v) } end |
Instance Attribute Details
#artists ⇒ Object
Returns the value of attribute artists.
12 13 14 |
# File 'lib/musicbox/catalog/track.rb', line 12 def artists @artists end |
#duration ⇒ Object
Returns the value of attribute duration.
10 11 12 |
# File 'lib/musicbox/catalog/track.rb', line 10 def duration @duration end |
#extraartists ⇒ Object
Returns the value of attribute extraartists.
11 12 13 |
# File 'lib/musicbox/catalog/track.rb', line 11 def extraartists @extraartists end |
#position ⇒ Object
Returns the value of attribute position.
8 9 10 |
# File 'lib/musicbox/catalog/track.rb', line 8 def position @position end |
#sub_tracks ⇒ Object
Returns the value of attribute sub_tracks.
13 14 15 |
# File 'lib/musicbox/catalog/track.rb', line 13 def sub_tracks @sub_tracks end |
#title ⇒ Object
Returns the value of attribute title.
9 10 11 |
# File 'lib/musicbox/catalog/track.rb', line 9 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/musicbox/catalog/track.rb', line 7 def type @type end |
Instance Method Details
#artist ⇒ Object
35 36 37 |
# File 'lib/musicbox/catalog/track.rb', line 35 def artist @artists ? ReleaseArtist.artists_to_s(@artists) : nil end |
#type_=(type) ⇒ Object
19 20 21 |
# File 'lib/musicbox/catalog/track.rb', line 19 def type_=(type) self.type = type end |