Class: Rlastfm::Track
- Inherits:
-
Object
- Object
- Rlastfm::Track
- Defined in:
- lib/rlastfm/track.rb
Instance Attribute Summary collapse
-
#album ⇒ Object
Returns the value of attribute album.
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Track
constructor
A new instance of Track.
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
#album ⇒ Object
Returns the value of attribute album.
3 4 5 |
# File 'lib/rlastfm/track.rb', line 3 def album @album end |
#artist ⇒ Object
Returns the value of attribute artist.
3 4 5 |
# File 'lib/rlastfm/track.rb', line 3 def artist @artist end |
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/rlastfm/track.rb', line 3 def duration @duration end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rlastfm/track.rb', line 3 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'lib/rlastfm/track.rb', line 3 def number @number end |