Class: Author
- Inherits:
-
Object
- Object
- Author
- Defined in:
- lib/stanzas/notification_stanza.rb
Instance Method Summary collapse
- #email ⇒ Object
-
#initialize(node) ⇒ Author
constructor
A new instance of Author.
- #name ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(node) ⇒ Author
Returns a new instance of Author.
48 49 50 |
# File 'lib/stanzas/notification_stanza.rb', line 48 def initialize(node) @node = node end |
Instance Method Details
#email ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/stanzas/notification_stanza.rb', line 68 def email if !@email if email = @node.at_xpath("./atom:email", {"atom" => "http://www.w3.org/2005/Atom"}) @email = email.text end end end |
#name ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/stanzas/notification_stanza.rb', line 52 def name if !@name if name = @node.at_xpath("./atom:name", {"atom" => "http://www.w3.org/2005/Atom"}) @name = name.text end end end |
#uri ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/stanzas/notification_stanza.rb', line 60 def uri if !@uri if uri = @node.at_xpath("./atom:uri", {"atom" => "http://www.w3.org/2005/Atom"}) @uri = uri.text end end end |