Class: LastFM::Tag
Instance Attribute Summary collapse
-
#count ⇒ Fixnum
The current value of count.
-
#name ⇒ String
The current value of name.
-
#reach ⇒ Fixnum
The current value of reach.
-
#streamable ⇒ Boolean
The current value of streamable.
-
#url ⇒ String
The current value of url.
-
#wiki ⇒ LastFM::Wiki
The current value of wiki.
Instance Method Summary collapse
Methods inherited from Struct
from_xml, #initialize, package
Constructor Details
This class inherits a constructor from LastFM::Struct
Instance Attribute Details
#count ⇒ Fixnum
9 10 11 |
# File 'lib/lastfm/tag.rb', line 9 def count @count end |
#name ⇒ String
9 10 11 |
# File 'lib/lastfm/tag.rb', line 9 def name @name end |
#reach ⇒ Fixnum
9 10 11 |
# File 'lib/lastfm/tag.rb', line 9 def reach @reach end |
#streamable ⇒ Boolean
9 10 11 |
# File 'lib/lastfm/tag.rb', line 9 def streamable @streamable end |
#url ⇒ String
9 10 11 |
# File 'lib/lastfm/tag.rb', line 9 def url @url end |
#wiki ⇒ LastFM::Wiki
9 10 11 |
# File 'lib/lastfm/tag.rb', line 9 def wiki @wiki end |
Instance Method Details
#update_from_node(node) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lastfm/tag.rb', line 11 def update_from_node(node) case node.name.to_sym when :name self.name = node.content when :url self.url = node.content when :reach self.reach = node.content.to_i when :count, :taggings self.count = node.content.to_i when :streamable self.streamable = (node.content == '1') when :wiki self.wiki = LastFM::Wiki.from_xml(node) end end |