class MusicMetaFixer::Song
Attributes
album[RW]
artist[RW]
genre[RW]
location[RW]
name[RW]
year[RW]
Public Class Methods
new(name)
click to toggle source
# File lib/music_meta_fixer/song.rb, line 5 def initialize name @name = name end
Public Instance Methods
compare_to(another_song)
click to toggle source
# File lib/music_meta_fixer/song.rb, line 9 def compare_to(another_song) diff = [] self.instance_variables.each do |key| key = key.to_s.delete("@").to_sym diff += [key] unless another_song.send(key) == self.send(key) end diff end
pretty_string()
click to toggle source
# File lib/music_meta_fixer/song.rb, line 18 def pretty_string "Artist: #{artist}\n" \ "Song: #{name}\n" \ "Genre: #{genre}\n" \ "Album: #{album}\n" \ "Year: #{year}" end