class

RSS::Channel

Inherits RSS::Element / Reference / Object

Contains information about an RSS channel (metadata) and its contents.

For precise documentation, see https://validator.w3.org/feed/docs/rss2.html

Constructors

Instance methods

<<(item : Item)
Source
add_ns(name : String | Symbol, url : URI | String)
Source
add_ns
Source
category

Specify one or more categories that the channel belongs to. Follows the same rules as the Item-level category element. More info.

Source
category=(category : Array(RSS::Category))
Source
cloud

Allows processes to register with a Cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. More info here.

Source
cloud=(cloud : Nil | RSS::Cloud)
Source
description

Phrase or sentence describing the channel.

Source
description=(description : String)
Source
docs

A URL that points to the documentation for the format used in the RSS file.

Defaults to the W3 RSS 2.0 specification. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.

Source
docs=(docs : URI)
Source
generator

A string indicating the program used to generate the channel.

Source
generator=(generator : String)
Source
image

Specifies a GIF, JPEG or PNG image that can be displayed with the channel.

Source
image=(image : Nil | RSS::Image)
Source
items

Contained elements of the channel.

Source
language

The language the channel is written in.

This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C.

Example: en-us

Source
language=(language : Nil | String)
Source
last_build_date

The last time the content of the channel changed.

Example: Sat, 07 Sep 2002 9:42:31 GMT

Source
last_build_date=(last_build_date : Time | Nil)
Source
managing_editor

Email address for person responsible for editorial content.

Example: geo@herald.com (George Matesky)

Source
managing_editor=(managing_editor : Nil | String)
Source
pub_date

The publication date for the content in the channel.

For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred).

Example: Sat, 07 Sep 2002 0:00:01 GMT

Source
pub_date=(pub_date : Time | Nil)
Source
push(item : Item)
Source
skip_days

A hint for aggregators telling them which hours they can skip.

Source
skip_days=(skip_days : Array(RSS::Day))
Source
skip_hours

A hint for aggregators telling them which days they can skip.

Source
skip_hours=(skip_hours : Array(Int32))
Source
text_input

Specifies a TextInput box that can be displayed with the channel.

Source
text_input=(text_input : Nil | RSS::TextInput)
Source
title

The name of the channel.

It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.

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

Serialises the channel to the XML builder.

Source
ttl

Time to live.

It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. More info here.

Source
ttl=(ttl : Int32 | Nil)
Source
webmaster

Email address for person responsible for technical issues relating to channel.

Example: betty@herald.com (Betty Guernsey)

Source
webmaster=(webmaster : Nil | String)
Source