Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
RSS
/
//opt/alt/ruby27/share/ri/system/RSS/cdesc-RSS.ri
U:RDoc::NormalModule[iI"RSS:ET@0o:RDoc::Markup::Document:@parts[0o;;[!S:RDoc::Markup::Heading: leveli: textI"RSS reading and writing;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[ I"SReally Simple Syndication (RSS) is a family of formats that describe 'feeds,' ;TI"Lspecially constructed XML documents that allow an interested person to ;TI"Rsubscribe and receive updates from a particular web service. This portion of ;TI"Jthe standard library provides tooling to read and create these feeds.;T@o; ;[I"SThe standard library supports RSS 0.91, 1.0, 2.0, and Atom, a related format. ;TI"FHere are some links to the standards documents for these formats:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"RSS;To;;;;[o;;0;[o; ;[I"60.9.1[http://www.rssboard.org/rss-0-9-1-netscape];To;;0;[o; ;[I"*1.0[http://web.resource.org/rss/1.0/];To;;0;[o; ;[I"32.0[http://www.rssboard.org/rss-specification];To;;0;[o; ;[I"-Atom[http://tools.ietf.org/html/rfc4287];T@S; ; i;I"Consuming RSS;T@o; ;[I"RIf you'd like to read someone's RSS feed with your Ruby code, you've come to ;TI"Nthe right place. It's really easy to do this, but we'll need the help of ;TI"open-uri:;T@o:RDoc::Markup::Verbatim;[I"require 'rss' ;TI"require 'open-uri' ;TI" ;TI"8url = 'http://www.ruby-lang.org/en/feeds/news.rss' ;TI"open(url) do |rss| ;TI"% feed = RSS::Parser.parse(rss) ;TI"+ puts "Title: #{feed.channel.title}" ;TI"! feed.items.each do |item| ;TI"$ puts "Item: #{item.title}" ;TI" end ;TI" end ;T:@format0o; ;[ I"SAs you can see, the workhorse is RSS::Parser#parse, which takes the source of ;TI"Sthe feed and a parameter that performs validation on the feed. We get back an ;TI"Pobject that has all of the data from our feed, accessible through methods. ;TI"RThis example shows getting the title out of the channel element, and looping ;TI"through the list of items.;T@S; ; i;I"Producing RSS;T@o; ;[I"OProducing our own RSS feeds is easy as well. Let's make a very basic feed:;T@o;;[I"require "rss" ;TI" ;TI".rss = RSS::Maker.make("atom") do |maker| ;TI"% maker.channel.author = "matz" ;TI"- maker.channel.updated = Time.now.to_s ;TI"J maker.channel.about = "http://www.ruby-lang.org/en/feeds/news.rss" ;TI", maker.channel.title = "Example Feed" ;TI" ;TI"& maker.items.new_item do |item| ;TI"` item.link = "http://www.ruby-lang.org/en/news/2010/12/25/ruby-1-9-2-p136-is-released/" ;TI"4 item.title = "Ruby 1.9.2-p136 is released" ;TI"& item.updated = Time.now.to_s ;TI" end ;TI" end ;TI" ;TI"puts rss ;T;0o; ;[I"QAs you can see, this is a very Builder-like DSL. This code will spit out an ;TI"RAtom feed with one item. If we needed a second item, we'd make another block ;TI"6with maker.items.new_item and build a second one.;T@S; ; i;I"Copyright;T@o; ;[I"<Copyright (c) 2003-2007 Kouhei Sutou <kou@cozmixng.org>;T@o; ;[I"KYou can redistribute it and/or modify it under the same terms as Ruby.;T@o; ;[I">There is an additional tutorial by the author of RSS at: ;TI"Nhttp://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en;T: @fileI"lib/rss.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I"lib/rss/0.9.rb;T;0o;;[ ;I"lib/rss/1.0.rb;T;0o;;[ ;I"lib/rss/2.0.rb;T;0o;;[ ;I"lib/rss/atom.rb;T;0o;;[ ;I"lib/rss/content.rb;T;0o;;[ ;I"lib/rss/content/1.0.rb;T;0o;;[ ;I"lib/rss/content/2.0.rb;T;0o;;[ ;I"lib/rss/converter.rb;T;0o;;[ ;I"lib/rss/dublincore.rb;T;0o;;[ ;I"lib/rss/dublincore/1.0.rb;T;0o;;[ ;I"lib/rss/dublincore/2.0.rb;T;0o;;[ ;I"lib/rss/dublincore/atom.rb;T;0o;;[ ;I"lib/rss/image.rb;T;0o;;[ ;I"lib/rss/itunes.rb;T;0o;;[ ;I"lib/rss/maker.rb;T;0o;;[ ;I"lib/rss/maker/0.9.rb;T;0o;;[ ;I"lib/rss/maker/1.0.rb;T;0o;;[ ;I"lib/rss/maker/2.0.rb;T;0o;;[ ;I"lib/rss/maker/atom.rb;T;0o;;[ ;I"lib/rss/maker/base.rb;T;0o;;[ ;I"lib/rss/maker/content.rb;T;0o;;[ ;I" lib/rss/maker/dublincore.rb;T;0o;;[ ;I"lib/rss/maker/entry.rb;T;0o;;[ ;I"lib/rss/maker/feed.rb;T;0o;;[ ;I"lib/rss/maker/image.rb;T;0o;;[ ;I"lib/rss/maker/itunes.rb;T;0o;;[ ;I"lib/rss/maker/slash.rb;T;0o;;[ ;I"!lib/rss/maker/syndication.rb;T;0o;;[ ;I"lib/rss/maker/taxonomy.rb;T;0o;;[ ;I"lib/rss/maker/trackback.rb;T;0o;;[ ;I"lib/rss/parser.rb;T;0o;;[ ;I"lib/rss/rexmlparser.rb;T;0o;;[ ;I"lib/rss/rss.rb;T;0o;;[ ;I"lib/rss/slash.rb;T;0o;;[ ;I"lib/rss/syndication.rb;T;0o;;[ ;I"lib/rss/taxonomy.rb;T;0o;;[ ;I"lib/rss/utils.rb;T;0o;;[ ;I"lib/rss/version.rb;T;0o;;[ ;I"lib/rss/xml-stylesheet.rb;T;0o;;[ ;I"lib/rss/xml.rb;T;0o;;[ ;I"lib/rss/xmlparser.rb;T;0o;;[ ;I"lib/rss/xmlscanner.rb;T;0;0;0[ [U:RDoc::Constant[i I"CONTENT_PREFIX;TI"RSS::CONTENT_PREFIX;T:public0o;;[o; ;[I".The prefix for the Content XML namespace.;T;@�;0@�@cRDoc::NormalModule0U;[i I"CONTENT_URI;TI"RSS::CONTENT_URI;T;0o;;[o; ;[I"*The URI of the Content specification.;T;@�;0@�@@�0U;[i I"DC_PREFIX;TI"RSS::DC_PREFIX;T;0o;;[o; ;[I"2The prefix for the Dublin Core XML namespace.;T;@�;0@�@@�0U;[i I"DC_URI;TI"RSS::DC_URI;T;0o;;[o; ;[I".The URI of the Dublin Core specification.;T;@�;0@�@@�0U;[i I"DublincoreModel;TI"RSS::DublincoreModel;T;I"RSS::DublinCoreModel;To;;[o; ;[I"For backward compatibility;T;@�;0@�@@�0U;[i I"IMAGE_PREFIX;TI"RSS::IMAGE_PREFIX;T;0o;;[o; ;[I",The prefix for the Image XML namespace.;T;@�;0@�@@�0U;[i I"IMAGE_URI;TI"RSS::IMAGE_URI;T;0o;;[o; ;[I")The URI for the Image specification.;T;@�;0@�@@�0U;[i I"IMAGE_ELEMENTS;TI"RSS::IMAGE_ELEMENTS;T;0o;;[o; ;[I"<This constant holds strings which contain the names of ;TI"1image elements, with the appropriate prefix.;T;@�;0@�@@�0U;[i I"ITUNES_PREFIX;TI"RSS::ITUNES_PREFIX;T;0o;;[o; ;[I"-The prefix for the iTunes XML namespace.;T;@�;0@�@@�0U;[i I"ITUNES_URI;TI"RSS::ITUNES_URI;T;0o;;[o; ;[I")The URI of the iTunes specification.;T;@�;0@�@@�0U;[i I"AVAILABLE_PARSER_LIBRARIES;TI"$RSS::AVAILABLE_PARSER_LIBRARIES;T;0o;;[o; ;[I"5The list of all available libraries for parsing.;T;@�;0@�@@�0U;[i I"AVAILABLE_PARSERS;TI"RSS::AVAILABLE_PARSERS;T;0o;;[o; ;[I"9The list of all available parsers, in constant form.;T;@�;0@�@@�0U;[i I"URI;TI" RSS::URI;T;0o;;[o; ;[I")The URI of the RSS 1.0 specification;T;@�;0@�@@�0U;[i I"SLASH_PREFIX;TI"RSS::SLASH_PREFIX;T;0o;;[o; ;[I",The prefix for the Slash XML namespace.;T;@�;0@�@@�0U;[i I"SLASH_URI;TI"RSS::SLASH_URI;T;0o;;[o; ;[I"(The URI of the Slash specification.;T;@�;0@�@@�0U;[i I"SY_PREFIX;TI"RSS::SY_PREFIX;T;0o;;[o; ;[I"2The prefix for the Syndication XML namespace.;T;@�;0@�@@�0U;[i I"SY_URI;TI"RSS::SY_URI;T;0o;;[o; ;[I".The URI of the Syndication specification.;T;@�;0@�@@�0U;[i I"TAXO_PREFIX;TI"RSS::TAXO_PREFIX;T;0o;;[o; ;[I"/The prefix for the Taxonomy XML namespace.;T;@�;0@�@@�0U;[i I" TAXO_URI;TI"RSS::TAXO_URI;T;0o;;[o; ;[I"AThe URI for the specification of the Taxonomy XML namespace.;T;@�;0@�@@�0U;[i I"TAXO_ELEMENTS;TI"RSS::TAXO_ELEMENTS;T;0o;;[o; ;[I"NThe listing of all the taxonomy elements, with the appropriate namespace.;T;@�;0@�@@�0U;[i I"VERSION;TI"RSS::VERSION;T;0o;;[o; ;[I"The current version of RSS;T;@�;0@�@@�0[ [[I" class;T[[;[ [:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[1I"lib/rss.rb;TI"lib/rss/0.9.rb;TI"lib/rss/1.0.rb;TI"lib/rss/2.0.rb;TI"lib/rss/atom.rb;TI"lib/rss/content.rb;TI"lib/rss/content/1.0.rb;TI"lib/rss/content/2.0.rb;TI"lib/rss/converter.rb;TI"lib/rss/dublincore.rb;TI"lib/rss/dublincore/1.0.rb;TI"lib/rss/dublincore/2.0.rb;TI"lib/rss/dublincore/atom.rb;TI"lib/rss/image.rb;TI"lib/rss/itunes.rb;TI"lib/rss/maker.rb;TI"lib/rss/maker/0.9.rb;TI"lib/rss/maker/1.0.rb;TI"lib/rss/maker/2.0.rb;TI"lib/rss/maker/atom.rb;TI"lib/rss/maker/base.rb;TI"lib/rss/maker/content.rb;TI" lib/rss/maker/dublincore.rb;TI"lib/rss/maker/entry.rb;TI"lib/rss/maker/feed.rb;TI"lib/rss/maker/image.rb;TI"lib/rss/maker/itunes.rb;TI"lib/rss/maker/slash.rb;TI"!lib/rss/maker/syndication.rb;TI"lib/rss/maker/taxonomy.rb;TI"lib/rss/maker/trackback.rb;TI"lib/rss/parser.rb;TI"lib/rss/rexmlparser.rb;TI"lib/rss/rss.rb;TI"lib/rss/slash.rb;TI"lib/rss/syndication.rb;TI"lib/rss/taxonomy.rb;TI"lib/rss/trackback.rb;TI"lib/rss/utils.rb;TI"lib/rss/version.rb;TI"lib/rss/xml-stylesheet.rb;TI"lib/rss/xml.rb;TI"lib/rss/xmlparser.rb;TI"lib/rss/xmlscanner.rb;T@�cRDoc::TopLevel