1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rss/maker.rb
kou 4ef7ec62ca * lib/rss/maker/taxonomy.rb: implemented taxonomy module for RSS
Maker.
* lib/rss/taxonomy.rb: supported RSS Maker.
* lib/rss/maker.rb: added taxonomy module support.

* lib/rss/rss.rb: adjusted to other element API.
* lib/rss/1.0.rb: adjusted to other element API but backward
  compatibility is reserved.
* lib/rss/0.9.rb: ditto.

* test/rss/test_maker_taxo.rb: added test case for taxonomy module
  for RSS Maker.
* test/rss/test_setup_maker_1.0.rb: added tests for taxo:topic.

* test/rss/test_setup_maker_1.0.rb: added backward compatibility
  test.
* test/rss/test_setup_maker_0.9.rb: ditto.
* test/rss/test_setup_maker_2.0.rb: ditto.

* test/rss/rss-testcase.rb: added convenience method for setting
  up taxo:topic.
* test/rss/rss-assertions.rb: added assertion for taxo:topic.

* sample/rss/blend.rb: followed new API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23 09:24:17 +00:00

37 lines
638 B
Ruby

require "rss/rss"
module RSS
module Maker
MAKERS = {}
class << self
def make(version, &block)
maker(version).make(&block)
end
def maker(version)
MAKERS[version]
end
def add_maker(version, maker)
MAKERS[version] = maker
end
def filename_to_version(filename)
File.basename(filename, ".*")
end
end
end
end
require "rss/maker/1.0"
require "rss/maker/2.0"
require "rss/maker/content"
require "rss/maker/dublincore"
require "rss/maker/syndication"
require "rss/maker/taxonomy"
require "rss/maker/trackback"
require "rss/maker/image"