Class: MPD::Song
- Inherits:
-
Hash
- Object
- Hash
- MPD::Song
- Defined in:
- lib/mpd/song.rb
Overview
Hash with predefined structure (see MAPPINGS) created from basic MPD song info Additionaly it stores base data via #data
Constant Summary collapse
- MAPPINGS =
{ file: 'file', artist: 'Artist', album: 'Album', title: 'Title', year: 'Date', genre: 'Genre', id: 'Id', position: 'Pos', time: 'Time' }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Song
constructor
A new instance of Song.
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
16 17 18 |
# File 'lib/mpd/song.rb', line 16 def data @data end |