Class: Shortwave::Model::Tag
- Defined in:
- lib/shortwave/model/tag.rb
Overview
A Last.fm tag
Attributes
name
-
Tag text
count
-
Number of times this tag has been applied
url
-
URL on Last.fm site
Instance Method Summary collapse
-
#albums ⇒ Object
Returns the most popular albums tagged with this tag.
-
#artists ⇒ Object
Returns the most popular artists tagged with this tag.
-
#similar ⇒ Object
Returns similar tags to this one.
-
#streamable? ⇒ Boolean
Can music be streamed from this tag?.
-
#to_s ⇒ Object
Returns the tag text.
-
#tracks ⇒ Object
Returns the most popular tracks tagged with this tag.
Methods inherited from BaseModel
facade_name, identified_by, inherited, link_to, #session=, sharable, shoutable, taggable
Instance Method Details
#albums ⇒ Object
Returns the most popular albums tagged with this tag.
27 28 29 |
# File 'lib/shortwave/model/tag.rb', line 27 def albums link :top_albums, :Album, name end |
#artists ⇒ Object
Returns the most popular artists tagged with this tag.
32 33 34 |
# File 'lib/shortwave/model/tag.rb', line 32 def artists link :top_artists, :Artist, name end |
#similar ⇒ Object
Returns similar tags to this one.
22 23 24 |
# File 'lib/shortwave/model/tag.rb', line 22 def similar link :similar, :Tag, name end |
#streamable? ⇒ Boolean
Can music be streamed from this tag?
17 18 19 |
# File 'lib/shortwave/model/tag.rb', line 17 def streamable? streamable end |
#to_s ⇒ Object
Returns the tag text
42 43 44 |
# File 'lib/shortwave/model/tag.rb', line 42 def to_s name end |
#tracks ⇒ Object
Returns the most popular tracks tagged with this tag.
37 38 39 |
# File 'lib/shortwave/model/tag.rb', line 37 def tracks link :top_tracks, :Track, name end |