Class: MingleEvents::Feed::Author
- Inherits:
-
Object
- Object
- MingleEvents::Feed::Author
- Defined in:
- lib/mingle_events/feed/author.rb
Overview
The user who’s Mingle activity triggered this event
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
The email address of the author.
-
#icon_uri ⇒ Object
readonly
The URI for the author’s icon.
-
#name ⇒ Object
readonly
The name of the author.
-
#uri ⇒ Object
readonly
The URI identifying the author as well as location of his profile data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(author_element) ⇒ Author
constructor
A new instance of Author.
Constructor Details
#initialize(author_element) ⇒ Author
Returns a new instance of Author.
16 17 18 19 20 21 |
# File 'lib/mingle_events/feed/author.rb', line 16 def initialize() @name = .inner_text("./atom:name") @email = .optional_inner_text("./atom:email") @uri = .optional_inner_text("./atom:uri") @icon_uri = .optional_inner_text("./mingle:icon") end |
Instance Attribute Details
#email ⇒ Object (readonly)
The email address of the author
10 11 12 |
# File 'lib/mingle_events/feed/author.rb', line 10 def email @email end |
#icon_uri ⇒ Object (readonly)
The URI for the author’s icon
14 15 16 |
# File 'lib/mingle_events/feed/author.rb', line 14 def icon_uri @icon_uri end |
#name ⇒ Object (readonly)
The name of the author
8 9 10 |
# File 'lib/mingle_events/feed/author.rb', line 8 def name @name end |
#uri ⇒ Object (readonly)
The URI identifying the author as well as location of his profile data
12 13 14 |
# File 'lib/mingle_events/feed/author.rb', line 12 def uri @uri end |
Class Method Details
.from_snippet(author_xml) ⇒ Object
23 24 25 |
# File 'lib/mingle_events/feed/author.rb', line 23 def self.from_snippet() self.new(Xml.parse(, ATOM_AND_MINGLE_NS).select("/atom:author")) end |