class

RSS::Item

Inherits RSS::Element / Reference / Object

A channel may contain any number of Items. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.

Constructors

new(title : Nil | String = nil, description : Nil | String = nil)
Source

Instance methods

author

Email address of the author of the item.

Source
author=(author : Nil | String)
Source
category

Includes the item in one or more categories.

The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. Processors may establish conventions for the interpretation of categories. Two examples are provided below: getter category : String?

Source
category=(category : Nil | RSS::Category)
Source
comments

Optional URL of the comments page for the item.

<comments>http://rateyourmusic.com/yaccs/commentsn/blogId=705245&itemId=271</comments>
Source
comments=(comments : Nil | URI)
Source
description

The item synopsis.

Source
description=(description : Nil | String)
Source
enclosure

Describes a media object that is attached to the item.

Source
enclosure=(enclosure : Nil | RSS::Enclosure)
Source
guid

Optional globally unique identifier.

It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.

<guid>http://some.server.com/weblogItem3207<guid>

There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.

If the guid element has an attribute named "isPermaLink" with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the <item> element. An example:

<guid isPermaLink="true">http://inessential.com/2002/09/01.php#a2</guid>

is_perma_link is optional and defaults to true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular.

Source
guid=(guid : Nil | URI)
Source
pub_date

<pubDate> is an optional sub-element of <item>.

Its value is a date, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date.

Source
pub_date=(pub_date : Time | Nil)
Source
source

The RSS channel that the item came from.

Source
source=(source : Nil | String)
Source
source_url

Required if source is non-nil.

Source
source_url=(source_url : Nil | URI)
Source
title

The title of the item.

Source
title=(title : Nil | String)
Source
to_xml(xml : XML::Builder)

Serialises the item to the XML builder.

Source