Class: Rlastfm::Track

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Track

Returns a new instance of Track.



5
6
7
# File 'lib/rlastfm/track.rb', line 5

def initialize(hash={})
  hash.each {|k,v| instance_variable_set("@#{k}", v) }
end

Instance Attribute Details

#albumObject

Returns the value of attribute album.



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

def album
  @album
end

#artistObject

Returns the value of attribute artist.



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

def artist
  @artist
end

#durationObject

Returns the value of attribute duration.



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

def duration
  @duration
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#numberObject

Returns the value of attribute number.



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

def number
  @number
end