Class: DutchTop40::Songs
- Inherits:
-
Object
- Object
- DutchTop40::Songs
- Defined in:
- lib/dutch_top40/songs.rb
Constant Summary collapse
- @@songs =
[]
Instance Attribute Summary collapse
-
#last_weeks_rank ⇒ Object
Returns the value of attribute last_weeks_rank.
-
#listed ⇒ Object
Returns the value of attribute listed.
-
#name ⇒ Object
Returns the value of attribute name.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(title, name, listed, last_weeks_rank) ⇒ Songs
constructor
A new instance of Songs.
Constructor Details
#initialize(title, name, listed, last_weeks_rank) ⇒ Songs
Returns a new instance of Songs.
7 8 9 10 11 12 13 |
# File 'lib/dutch_top40/songs.rb', line 7 def initialize(title, name, listed, last_weeks_rank) @title = title @name = name @listed = listed @last_weeks_rank = last_weeks_rank @@songs << self end |
Instance Attribute Details
#last_weeks_rank ⇒ Object
Returns the value of attribute last_weeks_rank.
3 4 5 |
# File 'lib/dutch_top40/songs.rb', line 3 def last_weeks_rank @last_weeks_rank end |
#listed ⇒ Object
Returns the value of attribute listed.
3 4 5 |
# File 'lib/dutch_top40/songs.rb', line 3 def listed @listed end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/dutch_top40/songs.rb', line 3 def name @name end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/dutch_top40/songs.rb', line 3 def title @title end |
Class Method Details
.list ⇒ Object
16 17 18 19 |
# File 'lib/dutch_top40/songs.rb', line 16 def self.list DutchTop40::Scraper.scrape_songs @@songs end |