class BillboardHot100::Song
Attributes
artist[RW]
award[RW]
last_week[RW]
lyrics[RW]
peak_position[RW]
rank[RW]
title[RW]
weeks_on_chart[RW]
Public Class Methods
all()
click to toggle source
# File lib/billboard_hot_100/song.rb, line 20 def self.all @@all end
create(songs)
click to toggle source
# File lib/billboard_hot_100/song.rb, line 7 def self.create(songs) songs.each do |song| self.new(song) end end
new(song_hash)
click to toggle source
# File lib/billboard_hot_100/song.rb, line 13 def initialize(song_hash) song_hash.each do |key, value| self.send(:"#{key}=", value) end @@all << self end