Class: Track
- Inherits:
-
Object
- Object
- Track
- Defined in:
- lib/deadlist/models/track.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(track_data) ⇒ Track
constructor
A new instance of Track.
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
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
2 3 4 |
# File 'lib/deadlist/models/track.rb', line 2 def filename @filename end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
2 3 4 |
# File 'lib/deadlist/models/track.rb', line 2 def pos @pos end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
2 3 4 |
# File 'lib/deadlist/models/track.rb', line 2 def title @title end |