Class: Musicbrainz::Track

Inherits:
Object
  • Object
show all
Defined in:
lib/wrapper/resources/track.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lengthObject

Returns the value of attribute length.



3
4
5
# File 'lib/wrapper/resources/track.rb', line 3

def length
  @length
end

#numberObject

Returns the value of attribute number.



3
4
5
# File 'lib/wrapper/resources/track.rb', line 3

def number
  @number
end

#recordingObject

Returns the value of attribute recording.



3
4
5
# File 'lib/wrapper/resources/track.rb', line 3

def recording
  @recording
end