Class: FeedParser::Author
- Inherits:
-
Object
- Object
- FeedParser::Author
- Defined in:
- lib/feedparser/author.rb
Instance Attribute Summary collapse
-
#avatar ⇒ Object
todo/check: use avatar_url ?? used by json feed -check if always a url.
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
-
#text ⇒ Object
(also: #line)
todo: add role - why? why not? e.g.
-
#url ⇒ Object
(also: #uri)
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#avatar ⇒ Object
todo/check: use avatar_url ?? used by json feed -check if always a url
17 18 19 |
# File 'lib/feedparser/author.rb', line 17 def avatar @avatar end |
#email ⇒ Object
Returns the value of attribute email.
14 15 16 |
# File 'lib/feedparser/author.rb', line 14 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/feedparser/author.rb', line 7 def name @name end |
#text ⇒ Object Also known as: line
todo: add role - why? why not?
e.g. add contributor (atom)
or managingEditor (rss) or webMaster (rss) - why? why not??
24 25 26 |
# File 'lib/feedparser/author.rb', line 24 def text @text end |
#url ⇒ Object Also known as: uri
Returns the value of attribute url.
8 9 10 |
# File 'lib/feedparser/author.rb', line 8 def url @url end |
Instance Method Details
#avatar? ⇒ Boolean
16 |
# File 'lib/feedparser/author.rb', line 16 def avatar?() @avatar.nil? == false; end |
#email? ⇒ Boolean
13 |
# File 'lib/feedparser/author.rb', line 13 def email?() @email.nil? == false; end |
#to_s ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/feedparser/author.rb', line 27 def to_s ## note: to_s - allows to use just author in templates ## will by default return name if present or as fallback "unparsed" text line if @name ## not blank @name else @text end end |