Class: LastFM::Shout
Instance Attribute Summary collapse
-
#author ⇒ String
The current value of author.
-
#body ⇒ String
The current value of body.
-
#date ⇒ Time
The current value of date.
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
#author ⇒ String
6 7 8 |
# File 'lib/lastfm/shout.rb', line 6 def end |
#body ⇒ String
6 7 8 |
# File 'lib/lastfm/shout.rb', line 6 def body @body end |
#date ⇒ Time
6 7 8 |
# File 'lib/lastfm/shout.rb', line 6 def date @date end |
Instance Method Details
#update_from_node(node) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lastfm/shout.rb', line 8 def update_from_node(node) case node.name.to_sym when :author self. = node.content when :body self.body = node.content when :date self.date = Time.parse(node.content) rescue nil end end |