2004-10-31 19:43:47 -05:00
|
|
|
require "rss/rss"
|
|
|
|
|
|
|
|
module RSS
|
|
|
|
module Maker
|
|
|
|
MAKERS = {}
|
2007-03-17 06:13:25 -04:00
|
|
|
|
2004-10-31 19:43:47 -05:00
|
|
|
class << self
|
2004-11-19 03:25:25 -05:00
|
|
|
def make(version, &block)
|
2007-03-17 06:13:25 -04:00
|
|
|
m = maker(version)
|
|
|
|
raise UnsupportedMakerVersionError.new(version) if m.nil?
|
|
|
|
m.make(&block)
|
2004-10-31 19:43:47 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def maker(version)
|
|
|
|
MAKERS[version]
|
|
|
|
end
|
|
|
|
|
|
|
|
def add_maker(version, maker)
|
|
|
|
MAKERS[version] = maker
|
|
|
|
end
|
|
|
|
|
2007-03-17 06:13:25 -04:00
|
|
|
def versions
|
|
|
|
MAKERS.keys.uniq.sort
|
|
|
|
end
|
|
|
|
|
|
|
|
def makers
|
|
|
|
MAKERS.values.uniq
|
2004-10-31 19:43:47 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2004-11-19 03:25:25 -05:00
|
|
|
|
|
|
|
require "rss/maker/1.0"
|
|
|
|
require "rss/maker/2.0"
|
2007-03-17 06:13:25 -04:00
|
|
|
require "rss/maker/feed"
|
|
|
|
require "rss/maker/entry"
|
2004-11-19 03:25:25 -05:00
|
|
|
require "rss/maker/content"
|
|
|
|
require "rss/maker/dublincore"
|
2007-09-15 00:41:28 -04:00
|
|
|
require "rss/maker/slash"
|
2004-11-19 03:25:25 -05:00
|
|
|
require "rss/maker/syndication"
|
2005-11-23 04:24:17 -05:00
|
|
|
require "rss/maker/taxonomy"
|
2004-11-19 03:25:25 -05:00
|
|
|
require "rss/maker/trackback"
|
2005-02-03 10:31:57 -05:00
|
|
|
require "rss/maker/image"
|
2007-08-04 23:03:05 -04:00
|
|
|
require "rss/maker/itunes"
|