Class: Track

Inherits:
Object
  • Object
show all
Defined in:
lib/deadlist/models/track.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(track_data) ⇒ Track

Returns a new instance of Track.



4
5
6
7
8
# File 'lib/deadlist/models/track.rb', line 4

def initialize(track_data)
  @pos = track_data["track"]
  @title = track_data["title"]
  @filename = track_data["name"]
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



2
3
4
# File 'lib/deadlist/models/track.rb', line 2

def filename
  @filename
end

#posObject (readonly)

Returns the value of attribute pos.



2
3
4
# File 'lib/deadlist/models/track.rb', line 2

def pos
  @pos
end

#titleObject (readonly)

Returns the value of attribute title.



2
3
4
# File 'lib/deadlist/models/track.rb', line 2

def title
  @title
end