Module: Shortwave::Model::WeeklyCharts
Instance Method Summary collapse
-
#album_chart ⇒ Object
Returns the most popular albums from this group for the last week.
-
#artist_chart ⇒ Object
Returns the most popular artists from this group for the last week.
-
#chart_dates ⇒ Object
Returns an array of Time ranges, repesenting the weeks charts are available.
-
#track_chart ⇒ Object
Returns the most popular tracks from this group for the last week.
Instance Method Details
#album_chart ⇒ Object
Returns the most popular albums from this group for the last week
5 6 7 |
# File 'lib/shortwave/model/weekly_charts.rb', line 5 def album_chart link :weekly_album_chart, "Album", name end |
#artist_chart ⇒ Object
Returns the most popular artists from this group for the last week
10 11 12 |
# File 'lib/shortwave/model/weekly_charts.rb', line 10 def artist_chart link :weekly_artist_chart, "Artist", name end |
#chart_dates ⇒ Object
Returns an array of Time ranges, repesenting the weeks charts are available
20 21 22 |
# File 'lib/shortwave/model/weekly_charts.rb', line 20 def chart_dates @chart_dates ||= charts.map {|cd| cd.from..cd.to }.reverse end |
#track_chart ⇒ Object
Returns the most popular tracks from this group for the last week
15 16 17 |
# File 'lib/shortwave/model/weekly_charts.rb', line 15 def track_chart link :weekly_track_chart, "Track", name end |