Class: Musicbrainz::Track
- Inherits:
-
Object
- Object
- Musicbrainz::Track
- Defined in:
- lib/wrapper/resources/track.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#number ⇒ Object
Returns the value of attribute number.
-
#recording ⇒ Object
Returns the value of attribute recording.
Instance Method Summary collapse
-
#initialize(args) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(args) ⇒ Track
Returns a new instance of Track.
5 6 7 8 9 10 |
# File 'lib/wrapper/resources/track.rb', line 5 def initialize args args.each do |k, v| instance_variable_set("@#{k.gsub('-', '_')}", v) unless v.nil? end self.recording = Musicbrainz::Recording.new(self.recording) if self.recording end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
3 4 5 |
# File 'lib/wrapper/resources/track.rb', line 3 def length @length end |
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'lib/wrapper/resources/track.rb', line 3 def number @number end |
#recording ⇒ Object
Returns the value of attribute recording.
3 4 5 |
# File 'lib/wrapper/resources/track.rb', line 3 def recording @recording end |