Class: Musk::Track
- Inherits:
-
Object
- Object
- Musk::Track
- Defined in:
- lib/musk/track.rb
Constant Summary collapse
- ATTRIBUTES =
[ :loadpath, :fullpath, :title, :number, :number_of, :artist, :release, :genre, :year, :comment, ]
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(attributes = {}) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(attributes = {}) ⇒ Track
Returns a new instance of Track.
18 19 20 |
# File 'lib/musk/track.rb', line 18 def initialize(attributes = {}) attributes.each { |k, v| send("#{k}=", v) if respond_to?("#{k}=") } end |
Instance Method Details
#attributes ⇒ Object
22 23 24 |
# File 'lib/musk/track.rb', line 22 def attributes Hash[ATTRIBUTES.map { |a| [a, send("#{a}")] }] end |