Class: Syndication::RSS::Channel
- Inherits:
-
Container
- Object
- Container
- 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)
-
- (Object) category
One or more categories for the channel, as an Array of Strings.
-
- (Object) cloud
rssCloud interface (for Radio UserLand).
-
- (Object) copyright
Copyright statement for channel.
-
- (Object) description
A textual description of the channel.
-
- (Object) docs
The URL of some documentation on what the RSS format is.
-
- (Object) generator
The software that generated the channel.
-
- (Object) image
The graphical image to represent the channel, as a Syndication::Image object.
-
- (Object) language
ISO code for the language the channel is written in.
-
- (Object) lastbuilddate
Last time content in channel changed, as a DateTime object if it can be parsed by DateTime; otherwise, as a String.
-
- (Object) link
The URL of the web site this is a channel for.
-
- (Object) managingeditor
E-mail address of person responsible for editorial content.
-
- (Object) pubdate
Publication date of content in channel, as a DateTime object if it can be parsed by DateTime; otherwise, as a String.
-
- (Object) rating
PICS rating for channel.
-
- (Object) skipdays
readonly
Full names (in English) of days when the feed can be skipped.
-
- (Object) skiphours
readonly
Hours when the feed can be skipped (because it will not have new content).
-
- (Object) textinput
The TextInput area as a Syndication::TextInput object.
-
- (Object) title
The title of the channel.
-
- (Object) ttl
Time to live for this copy of the channel.
-
- (Object) webmaster
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)
-
- (Object) day=(dayname)
Add a day name to the list of days to skip.
-
- (Object) hour=(hr)
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
- (Object) category
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 |
- (Object) cloud
rssCloud interface (for Radio UserLand).
160 161 162 |
# File 'lib/syndication/rss.rb', line 160 def cloud @cloud end |
- (Object) copyright
Copyright statement for channel.
136 137 138 |
# File 'lib/syndication/rss.rb', line 136 def copyright @copyright end |
- (Object) description
A textual description of the channel.
134 135 136 |
# File 'lib/syndication/rss.rb', line 134 def description @description end |
- (Object) docs
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 |
- (Object) generator
The software that generated the channel.
154 155 156 |
# File 'lib/syndication/rss.rb', line 154 def generator @generator end |
- (Object) image
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 |
- (Object) language
ISO code for the language the channel is written in.
138 139 140 |
# File 'lib/syndication/rss.rb', line 138 def language @language end |
- (Object) lastbuilddate
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 |
- (Object) link
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 |
- (Object) managingeditor
E-mail address of person responsible for editorial content.
140 141 142 |
# File 'lib/syndication/rss.rb', line 140 def managingeditor @managingeditor end |
- (Object) pubdate
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 |
- (Object) rating
PICS rating for channel.
162 163 164 |
# File 'lib/syndication/rss.rb', line 162 def @rating end |
- (Object) skipdays (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 |
- (Object) skiphours (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 |
- (Object) textinput
The TextInput area as a Syndication::TextInput object.
164 165 166 |
# File 'lib/syndication/rss.rb', line 164 def textinput @textinput end |
- (Object) title
The title of the channel.
130 131 132 |
# File 'lib/syndication/rss.rb', line 130 def title @title end |
- (Object) ttl
Time to live for this copy of the channel.
158 159 160 |
# File 'lib/syndication/rss.rb', line 158 def ttl @ttl end |
- (Object) webmaster
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
- (Object) day=(dayname)
Add a day name to the list of days to skip.
The <day> element in fact comes inside <skipDays>, but we don't enforce that; we just make the Channel recognize it and store the values.
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 |
- (Object) hour=(hr)
Add an hour to the list of hours to skip.
The <hour> element in fact comes inside <skipHours>, but we don't enforce that; we just make the Channel recognize it and store the values.
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 |