Class: MonkeyMusic::Metadata::Album
- Inherits:
-
Object
- Object
- MonkeyMusic::Metadata::Album
- Defined in:
- lib/monkey_music/metadata/album.rb
Instance Attribute Summary collapse
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Album
constructor
A new instance of Album.
- #serialize ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Album
Returns a new instance of Album.
5 6 7 8 9 |
# File 'lib/monkey_music/metadata/album.rb', line 5 def initialize(args = {}) @name = args[:name] @artist = args[:artist] @year = args[:year] end |
Instance Attribute Details
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
3 4 5 |
# File 'lib/monkey_music/metadata/album.rb', line 3 def artist @artist end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/monkey_music/metadata/album.rb', line 3 def name @name end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
3 4 5 |
# File 'lib/monkey_music/metadata/album.rb', line 3 def year @year end |
Instance Method Details
#serialize ⇒ Object
11 12 13 |
# File 'lib/monkey_music/metadata/album.rb', line 11 def serialize "#{@name},#{@artist},#{@year}" end |