Class: Author

Inherits:
Object
  • Object
show all
Defined in:
lib/stanzas/notification_stanza.rb

Instance Method Summary collapse

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

#emailObject



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

#nameObject



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

#uriObject



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