Module: RSS::Maker
- Defined in:
- lib/rss/maker.rb,
lib/rss/maker/0.9.rb,
lib/rss/maker/1.0.rb,
lib/rss/maker/2.0.rb,
lib/rss/maker/atom.rb,
lib/rss/maker/base.rb,
lib/rss/maker/feed.rb,
lib/rss/maker/entry.rb,
lib/rss/maker/image.rb,
lib/rss/maker/slash.rb,
lib/rss/maker/itunes.rb,
lib/rss/maker/content.rb,
lib/rss/maker/taxonomy.rb,
lib/rss/maker/trackback.rb,
lib/rss/maker/dublincore.rb,
lib/rss/maker/syndication.rb
Defined Under Namespace
Modules: Atom, AtomCategory, AtomGenerator, AtomLink, AtomLogo, AtomPersonConstructBase, AtomPersons, AtomTextConstruct, AtomTextConstructBase, ContentModel, DublinCoreModel, ITunesBaseModel, ITunesChannelModel, ITunesItemModel, ImageFaviconModel, ImageItemModel, SetupDefaultDate, SetupDefaultLanguage, SlashModel, SyndicationModel, TaxonomyTopicModel, TaxonomyTopicsModel, TrackBackModel
Classes: Base, ChannelBase, ImageBase, ItemsBase, RSS09, RSS091, RSS092, RSS10, RSS20, RSSBase, TextinputBase, XMLStyleSheets
Constant Summary
collapse
- MAKERS =
{}
Class Method Summary
collapse
Class Method Details
.[](version) ⇒ Object
12
13
14
15
16
|
# File 'lib/rss/maker.rb', line 12
def [](version)
maker_info = maker(version)
raise UnsupportedMakerVersionError.new(version) if maker_info.nil?
maker_info[:maker]
end
|
.add_maker(version, normalized_version, maker) ⇒ Object
18
19
20
|
# File 'lib/rss/maker.rb', line 18
def add_maker(version, normalized_version, maker)
MAKERS[version] = {:maker => maker, :version => normalized_version}
end
|
.make(version, &block) ⇒ Object
8
9
10
|
# File 'lib/rss/maker.rb', line 8
def make(version, &block)
self[version].make(&block)
end
|
.makers ⇒ Object
26
27
28
|
# File 'lib/rss/maker.rb', line 26
def makers
MAKERS.values.collect {|info| info[:maker]}.uniq
end
|
.supported?(version) ⇒ Boolean
30
31
32
|
# File 'lib/rss/maker.rb', line 30
def supported?(version)
versions.include?(version)
end
|
.versions ⇒ Object
22
23
24
|
# File 'lib/rss/maker.rb', line 22
def versions
MAKERS.keys.uniq.sort
end
|