class FeedParser::Item
Attributes
attachments[RW]
add attachments/media enclosures (url, length and type)
note: lets support more than one (it's an array)
categories[RW]
content[RW]
content_html[RW]
content_html=[RW]
content_text[RW]
description[RW]
description=[RW]
enclosures[RW]
add attachments/media enclosures (url, length and type)
note: lets support more than one (it's an array)
external_url[RW]
guid[RW]
guid=[RW]
id[RW]
published[RW]
published_line[RW]
published_local[RW]
published_text[RW]
summary[RW]
title[RW]
updated[RW]
updated_line[RW]
updated_local[RW]
updated_text[RW]
url[RW]
Public Class Methods
new()
click to toggle source
# File lib/feedparser/item.rb, line 99 def initialize ## note: make authors, tags empty arrays on startup (e.g. not nil) @authors = [] @tags = [] @attachments = [] end
Public Instance Methods
attachment()
click to toggle source
# File lib/feedparser/item.rb, line 89 def attachment() @attachments[0]; end
Also aliased as: enclosure
attachments?()
click to toggle source
# File lib/feedparser/item.rb, line 90 def attachments?() @attachments && @attachments.size > 0; end
content?()
click to toggle source
note: only content/content_html should use html;
all others (e.g. title/summary/content_text) shoud be plain (vanilla) text
# File lib/feedparser/item.rb, line 20 def content?() @content.nil? == false; end
Also aliased as: content_html?
content_text?()
click to toggle source
# File lib/feedparser/item.rb, line 30 def content_text?() @content_text.nil? == false; end
published?()
click to toggle source
# File lib/feedparser/item.rb, line 53 def published?() @published.nil? == false; end
summary?()
click to toggle source
# File lib/feedparser/item.rb, line 35 def summary?() @summary.nil? == false; end
Also aliased as: description?
updated?()
click to toggle source
# File lib/feedparser/item.rb, line 45 def updated?() @updated.nil? == false; end