diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-07 03:36:38 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-07 03:36:38 +0000 |
commit | 8dfa6fb0a80d633d71987f06462823ca13b67be8 (patch) | |
tree | ccf92cc3af99d21f06a5a9c32d02e247abe74592 /sample/rss/rss_recent.rb | |
parent | 4ded52b623ebd1b3de12db82f8b54cc156c1fd28 (diff) |
* lib/rss/parser.rb, lib/rss/1.0.rb: accepted rdf:resource or
resource attribute in rdf:li.
* test/rss/test_parser.rb: added test for above change.
* lib/rss/dublincore.rb: reverted style.
* lib/rss/xmlparser.rb: normalized XMLParser class hierarchy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/rss/rss_recent.rb')
-rw-r--r-- | sample/rss/rss_recent.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sample/rss/rss_recent.rb b/sample/rss/rss_recent.rb index 3ccb4a4505..8e40151e1c 100644 --- a/sample/rss/rss_recent.rb +++ b/sample/rss/rss_recent.rb @@ -10,10 +10,8 @@ class String end end -require "rss/parser" require "rss/1.0" require "rss/2.0" -require "rss/syndication" require "rss/dublincore" items = [] @@ -76,9 +74,10 @@ processing_time = Time.now - before_time items.sort do |x, y| y[1].dc_date <=> x[1].dc_date end[0..20].each do |channel, item| - puts "#{item.dc_date.localtime.iso8601} : " << - "#{channel.title} : #{item.title}" - puts " description : #{item.description.shorten(50)}" if item.description + puts "#{item.dc_date.localtime.iso8601}: " << + "#{channel.title}: #{item.title}" + puts " Description: #{item.description.shorten(50)}" if item.description end -puts "Processing Time : #{processing_time}s" +puts "Used XML parser: #{RSS::Parser.default_parser}" +puts "Processing time: #{processing_time}s" |