Class: Rss2Html::FeedItem
- Inherits:
-
Object
- Object
- Rss2Html::FeedItem
- Defined in:
- lib/rss2html/feed_item.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(item) ⇒ FeedItem
constructor
A new instance of FeedItem.
Constructor Details
#initialize(item) ⇒ FeedItem
Returns a new instance of FeedItem.
21 22 23 24 25 26 27 |
# File 'lib/rss2html/feed_item.rb', line 21 def initialize(item) @title = item.title.content = item..name.content @date = item.updated.content @summary = item.summary.content.strip @url = URI.parse(item.link.href) end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
19 20 21 |
# File 'lib/rss2html/feed_item.rb', line 19 def end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
19 20 21 |
# File 'lib/rss2html/feed_item.rb', line 19 def date @date end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
19 20 21 |
# File 'lib/rss2html/feed_item.rb', line 19 def summary @summary end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
19 20 21 |
# File 'lib/rss2html/feed_item.rb', line 19 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
19 20 21 |
# File 'lib/rss2html/feed_item.rb', line 19 def url @url end |