Class: FeedUtils::Item
- Inherits:
-
Object
- Object
- FeedUtils::Item
- Defined in:
- lib/feedutils/item.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
no content? try/return summary.
-
#content_type ⇒ Object
optional for now (text|html|html-escaped|binary-base64) - not yet set.
-
#guid ⇒ Object
todo: rename to id (use alias) ??.
-
#object ⇒ Object
orginal object (e.g RSS item or ATOM entry etc.).
-
#published ⇒ Object
no published date? try/return updated.
-
#summary ⇒ Object
no summary? try/return content.
-
#summary_type ⇒ Object
optional for now (text|html|html-escaped) - not yet set.
-
#title ⇒ Object
Returns the value of attribute title.
-
#title_type ⇒ Object
optional for now (text|html|html-escaped) - not yet set.
-
#updated ⇒ Object
Returns the value of attribute updated.
-
#url ⇒ Object
todo: rename to link (use alias) ??.
Instance Method Summary collapse
Instance Attribute Details
#content ⇒ Object
no content? try/return summary
12 |
# File 'lib/feedutils/item.rb', line 12 def content() content? ? @content : @summary; end |
#content_type ⇒ Object
optional for now (text|html|html-escaped|binary-base64) - not yet set
16 17 18 |
# File 'lib/feedutils/item.rb', line 16 def content_type @content_type end |
#guid ⇒ Object
todo: rename to id (use alias) ??
37 38 39 |
# File 'lib/feedutils/item.rb', line 37 def guid @guid end |
#object ⇒ Object
orginal object (e.g RSS item or ATOM entry etc.)
4 5 6 |
# File 'lib/feedutils/item.rb', line 4 def object @object end |
#published ⇒ Object
no published date? try/return updated
30 |
# File 'lib/feedutils/item.rb', line 30 def published() published? ? @published : @updated; end |
#summary ⇒ Object
no summary? try/return content
19 |
# File 'lib/feedutils/item.rb', line 19 def summary() summary? ? @summary : @content; end |
#summary_type ⇒ Object
optional for now (text|html|html-escaped) - not yet set
23 24 25 |
# File 'lib/feedutils/item.rb', line 23 def summary_type @summary_type end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/feedutils/item.rb', line 6 def title @title end |
#title_type ⇒ Object
optional for now (text|html|html-escaped) - not yet set
7 8 9 |
# File 'lib/feedutils/item.rb', line 7 def title_type @title_type end |
#updated ⇒ Object
Returns the value of attribute updated.
35 36 37 |
# File 'lib/feedutils/item.rb', line 35 def updated @updated end |
#url ⇒ Object
todo: rename to link (use alias) ??
8 9 10 |
# File 'lib/feedutils/item.rb', line 8 def url @url end |
Instance Method Details
#content? ⇒ Boolean
13 |
# File 'lib/feedutils/item.rb', line 13 def content?() @content.nil? == false; end |
#published? ⇒ Boolean
31 |
# File 'lib/feedutils/item.rb', line 31 def published?() @published.nil? == false; end |
#summary? ⇒ Boolean
20 |
# File 'lib/feedutils/item.rb', line 20 def summary?() @summary.nil? == false; end |
#updated? ⇒ Boolean
34 |
# File 'lib/feedutils/item.rb', line 34 def updated?() @updated.nil? == false; end |