Class: LastFM::Wiki
Instance Attribute Summary collapse
-
#content ⇒ String
Full content of this entry.
-
#published ⇒ Time
Date the information in this entry was published.
-
#summary ⇒ String
Short summary of the information in this entry.
Instance Method Summary collapse
Methods inherited from Struct
from_xml, inherited, #initialize, package, #to_json
Constructor Details
This class inherits a constructor from LastFM::Struct
Instance Attribute Details
#content ⇒ String
Full content of this entry
6 7 8 |
# File 'lib/lastfm/wiki.rb', line 6 def content @content end |
#published ⇒ Time
Date the information in this entry was published
6 7 8 |
# File 'lib/lastfm/wiki.rb', line 6 def published @published end |
#summary ⇒ String
Short summary of the information in this entry
6 7 8 |
# File 'lib/lastfm/wiki.rb', line 6 def summary @summary end |
Instance Method Details
#update_from_node(node) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lastfm/wiki.rb', line 8 def update_from_node(node) case node.name.to_sym when :published self.published = Time.parse(node.content) rescue nil when :summary #TODO: Remove CDATA wrapper self.summary = node.content when :content #TODO: Remove CDATA wrapper self.content = node.content end end |