Class: Syndication::RSS::Channel
- Includes:
- Content, DublinCore, Podcast::Both, Podcast::Channel
- Defined in:
- lib/syndication/rss.rb,
lib/syndication/content.rb,
lib/syndication/podcast.rb,
lib/syndication/dublincore.rb
Overview
Represents metadata about an RSS feed as a whole. Typically found via the Syndication::RSS::Feed#channel method.
Instance Attribute Summary collapse
-
#category ⇒ Object
One or more categories for the channel, as an Array of Strings.
-
#cloud ⇒ Object
rssCloud interface (for Radio UserLand).
-
#copyright ⇒ Object
Copyright statement for channel.
-
#description ⇒ Object
A textual description of the channel.
-
#docs ⇒ Object
The URL of some documentation on what the RSS format is.
-
#generator ⇒ Object
The software that generated the channel.
-
#image ⇒ Object
The graphical image to represent the channel, as a Syndication::Image object.
-
#language ⇒ Object
ISO code for the language the channel is written in.
-
#lastbuilddate ⇒ Object
Last time content in channel changed, as a DateTime object if it can be parsed by DateTime; otherwise, as a String.
-
#link ⇒ Object
The URL of the web site this is a channel for.
-
#managingeditor ⇒ Object
E-mail address of person responsible for editorial content.
-
#pubdate ⇒ Object
Publication date of content in channel, as a DateTime object if it can be parsed by DateTime; otherwise, as a String.
-
#rating ⇒ Object
PICS rating for channel.
-
#skipdays ⇒ Object
readonly
Full names (in English) of days when the feed can be skipped.
-
#skiphours ⇒ Object
readonly
Hours when the feed can be skipped (because it will not have new content).
-
#textinput ⇒ Object
The TextInput area as a Syndication::TextInput object.
-
#title ⇒ Object
The title of the channel.
-
#ttl ⇒ Object
Time to live for this copy of the channel.
-
#webmaster ⇒ Object
E-mail address of person responsible for technical issues with feed.
Attributes included from DublinCore
#dc_contributor, #dc_coverage, #dc_creator, #dc_date, #dc_description, #dc_format, #dc_identifier, #dc_language, #dc_publisher, #dc_relation, #dc_rights, #dc_source, #dc_subject, #dc_title, #dc_type
Attributes included from Podcast::Both
#itunes_block, #itunes_category, #itunes_explicit, #itunes_keywords, #itunes_subtitle, #itunes_summary
Attributes included from Podcast::Channel
Attributes included from Content
Instance Method Summary collapse
-
#day=(dayname) ⇒ Object
Add a day name to the list of days to skip.
-
#hour=(hr) ⇒ Object
Add an hour to the list of hours to skip.
Methods included from Content
Methods inherited from Container
#initialize, #parse_date, #store, #store_category, #strip, #tag2method, #tag_end, #tag_start
Constructor Details
This class inherits a constructor from Syndication::Container
Instance Attribute Details
#category ⇒ Object
One or more categories for the channel, as an Array of Strings.
151 152 153 |
# File 'lib/syndication/rss.rb', line 151 def category @category end |
#cloud ⇒ Object
rssCloud interface (for Radio UserLand).
160 161 162 |
# File 'lib/syndication/rss.rb', line 160 def cloud @cloud end |
#copyright ⇒ Object
Copyright statement for channel.
136 137 138 |
# File 'lib/syndication/rss.rb', line 136 def copyright @copyright end |
#description ⇒ Object
A textual description of the channel.
134 135 136 |
# File 'lib/syndication/rss.rb', line 134 def description @description end |
#docs ⇒ Object
The URL of some documentation on what the RSS format is.
156 157 158 |
# File 'lib/syndication/rss.rb', line 156 def docs @docs end |
#generator ⇒ Object
The software that generated the channel.
154 155 156 |
# File 'lib/syndication/rss.rb', line 154 def generator @generator end |
#image ⇒ Object
The graphical image to represent the channel, as a Syndication::Image object.
149 150 151 |
# File 'lib/syndication/rss.rb', line 149 def image @image end |
#language ⇒ Object
ISO code for the language the channel is written in.
138 139 140 |
# File 'lib/syndication/rss.rb', line 138 def language @language end |
#lastbuilddate ⇒ Object
Last time content in channel changed, as a DateTime object if it can be parsed by DateTime; otherwise, as a String.
180 181 182 |
# File 'lib/syndication/rss.rb', line 180 def lastbuilddate return parse_date(@lastbuilddate) end |
#link ⇒ Object
The URL of the web site this is a channel for.
132 133 134 |
# File 'lib/syndication/rss.rb', line 132 def link @link end |
#managingeditor ⇒ Object
E-mail address of person responsible for editorial content.
140 141 142 |
# File 'lib/syndication/rss.rb', line 140 def managingeditor @managingeditor end |
#pubdate ⇒ Object
Publication date of content in channel, as a DateTime object if it can be parsed by DateTime; otherwise, as a String.
174 175 176 |
# File 'lib/syndication/rss.rb', line 174 def pubdate return parse_date(@pubdate) end |
#rating ⇒ Object
PICS rating for channel.
162 163 164 |
# File 'lib/syndication/rss.rb', line 162 def @rating end |
#skipdays ⇒ Object (readonly)
Full names (in English) of days when the feed can be skipped.
170 171 172 |
# File 'lib/syndication/rss.rb', line 170 def skipdays @skipdays end |
#skiphours ⇒ Object (readonly)
Hours when the feed can be skipped (because it will not have new content). Returned as an Array of values in the range 0..23 (even if parsing the UserLand variant of RSS 0.91).
168 169 170 |
# File 'lib/syndication/rss.rb', line 168 def skiphours @skiphours end |
#textinput ⇒ Object
The TextInput area as a Syndication::TextInput object.
164 165 166 |
# File 'lib/syndication/rss.rb', line 164 def textinput @textinput end |
#title ⇒ Object
The title of the channel.
130 131 132 |
# File 'lib/syndication/rss.rb', line 130 def title @title end |
#ttl ⇒ Object
Time to live for this copy of the channel.
158 159 160 |
# File 'lib/syndication/rss.rb', line 158 def ttl @ttl end |
#webmaster ⇒ Object
E-mail address of person responsible for technical issues with feed.
142 143 144 |
# File 'lib/syndication/rss.rb', line 142 def webmaster @webmaster end |
Instance Method Details
#day=(dayname) ⇒ Object
Add a day name to the list of days to skip.
The
202 203 204 205 206 207 208 209 |
# File 'lib/syndication/rss.rb', line 202 def day=(dayname) if dayname.kind_of?(String) if !defined? @skipdays @skipdays = Array.new end @skipdays << dayname end end |
#hour=(hr) ⇒ Object
Add an hour to the list of hours to skip.
The
188 189 190 191 192 193 194 195 196 |
# File 'lib/syndication/rss.rb', line 188 def hour=(hr) if hr.kind_of?(String) if !defined? @skiphours @skiphours = Array.new end h = hr.to_i @skiphours << (h == 24 ? 0 : h) end end |